Giter VIP home page Giter VIP logo

Comments (5)

handrews avatar handrews commented on May 12, 2024 1

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.

handrews avatar handrews commented on May 12, 2024

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.

awwright avatar awwright commented on May 12, 2024

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.

handrews avatar handrews commented on May 12, 2024

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.

handrews avatar handrews commented on May 12, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.