-
Notifications
You must be signed in to change notification settings - Fork 35
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
schemas must allow referencing in addition to nesting #280
Comments
On second thought: I think you want your schemas to be quite inflexible for easier interoperation.
|
@nissimsan @BenjaminMoe can you propose some concrete action regarding this? |
This reminds me of XML vs XML-RDF. |
@nissimsan XML-RDF is the worst RDF serialization because you can express the same graph using a variety of XMLs I'll copy a comment from #290 that's more salient here: Every time you have a JSONLD sub-object or a textual ID, you could have a URL.
How can JSON Schema handle this variety? And copied data is outdated data. @OR13 @BenjaminMoe In other words, the current schemas are over-optimized for messages. If you agree with the importance I attach to this issue then we need to:
|
Hi @VladimirAlexiev, To be clear, I'm not advocating for XML-RDF, just pointing out the hierarchy vs flat structure with references similarity. First, schema and example/instance seems conflated throughout this ticket. The original point was to define schemas by means of URL references, but the example includes instance-identifiers ( Second, you originally headed in the direction of "On second thought: I think you want your schemas to be quite inflexible for easier interoperation." which I find is an important argument. We are intentionally doing both JSON Schema and LD. What you are advocating here is more of a pure LD approach(?) I think this is a dangerous path in terms of adoption. There are orders of magnitude more developers in the world comfortable adding a JSON Schema to an API than those comfortable carving out and merging data graphs. We might not have a well articulated strategy on this part, but the approach of "just use this JSON Schema and get LD for free" quite powerful, bridging the the traditional API world with the brave new graph world. I can live with the limitations of lowest common denominator of LD and JSON Schema in the attempt to reach this goal. We have to be gentle. And the world is full of locked down business processes with defined messaging anyway. |
We are currently not planning on supporting anything other than OpenAPI specification v3. |
I suggest we stick to using OAS 3.0 |
Agreed. While the normalized flat structure with references looks very attractive, the world is full of developers who can intuitively pick up a hierarchical JSON. That is our primary audience. |
Typically issuer organzation is also represented elsewhere on the credential. Like the (issuing) Carrier on a BL. |
If I'm not mistaken, the current schemas always specify nesting because you "include" other schemas.
In other words, you'd force me have this payload:
But I'd much rather have this:
Companies are certainly no less important than their products and shipping documents, so they deserve to have top-level nodes of their own.
JSONLD allows nesting, referencing, or combinations (e.g. I can nest the first instance in BillOfLading, and reuse it in Product).
But IMHO your schemas allow only nesting.
The text was updated successfully, but these errors were encountered: