Comments (5)
It's been more than two weeks since this was put up for adoption with no takers, and two of us against the proposal. Closing.
from json-schema-spec.
An alternative proposal would be to just use the existing LDO approach with a JSON Pointer fragment URI. While slightly less clear, it has the advantage of putting all links, local or not, in the same format. It also avoids the duplication problem.
from json-schema-spec.
This needs a really good example of why this would be useful.
If you want to express a relationship between the two, you should give the two instances URIs, then create a link using those URIs.
Is there ever a case where we don't want to give the instances URIs, but still allow software to see a relationship? That sounds really far-fetched
from json-schema-spec.
Is there ever a case where we don't want to give the instances URIs, but still allow software to see a relationship? That sounds really far-fetched
Not that I can think of.
Are we agreeing on the solution here? I meant something like:
{
"title": "Programming project",
"description": "A description of a programming project",
"type": "object",
"properties": {
"id": {"type": "integer", "minimum": 1},
...,
"author": {"$ref": "/definitions/user"}
},
"links": [
{
"rel": "self",
"href": "/projects/{id}"
},
{
"title": "Author",
"rel": "http://schema.org/author",
"href": "#/author"
}
]
}
Which I think says "There is a link from this instance at https://api.example.com/projects/12345 to an author at https://api.example.com/projects/12345/#/author"
Is that what you had in mind? As much as I hate HTML analogies, I'll make one here- this is the equivalent of <a href="#foo">link to foo</a>
and <a name="foo">this is foo</a>
(or id
instead of name
in HTML5).
from json-schema-spec.
@awwright , @Relequestual , anyone else: Does anyone want to adopt this proposal? @awwright and I are both against the proposed solution. I commented on another approach but if that approach is needed or valid at all, it does not require any changes to the spec.
If no one speaks up within two weeks, I will close this issue.
from json-schema-spec.
Related Issues (20)
- Applicator, Assertion, and Annotation as behaviors not categories HOT 2
- No standard way to define schema for key in "Record-like" objects HOT 2
- Patato HOT 1
- Specification page leads to 404 HOT 2
- If-Then-Else supported? HOT 4
- Core regex should permit "."
- OneOf property is failing during OAS Schema Validation HOT 4
- Intended interplay between "type" and "enum" HOT 2
- Validation Regex Description (section 7.3.8) should follow format of other string validation types
- Enum : Clarification HOT 2
- Build failure due to Relative JSON Pointer specification HOT 1
- Pattern: clarification on whether leading and trailing delimiters are allowed or required HOT 2
- Omitted `prefixItems` vs empty HOT 1
- Evaluation path: relative to $ref resolved schema or resource/document root? HOT 4
- JSON
- Feature Request: Constraint for single occurrence of a property structure in JSON Schema HOT 1
- Use JSON Pointers instead of 'properties' or 'prefixItems' keywords HOT 16
- Json-schema HOT 1
- How do I get the use Json to get the "about" and "mention" property to work with several subjects? HOT 4
- Statement on annotation values is unclear
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json-schema-spec.