Skip to content
This repository was archived by the owner on Feb 29, 2020. It is now read-only.
This repository was archived by the owner on Feb 29, 2020. It is now read-only.

An idea for URL Fragments #16

@sheavalentine-mdsol

Description

@sheavalentine-mdsol

So, if a service is serving a Hale document, and a client requests a fragment, there is a sound and consistent way we could handle that (or that the client could handle it).
If an attribute matches the first part (divided by slashes) of a fragment it gets the attribute:

"_links" {"self": {"href": "http://some.hale.doc/resource"}},
"attr1": "foo"
"attr2": {"sub1": "ninja", "sub2": "cow"}
"_embedded": {"items": [{"_links": {"self": {"href": "some.hale.doc/resource/id1"}}}]}
}

http://some.hale.doc/resource#attr1 returns

"foo"

http://some.hale.doc/resource#attr2 returns

{"sub1": "ninja", "sub2": "cow"}

You can also subselect
http://some.hale.doc/resource#attr2/sub1

"ninja"

If no attribute matches, check embedded:
http://some.hale.doc/resource#items

 [{"_links": {"self": {"href": "some.hale.doc/resource/id1"}}}]

otherwise try and match a link
http://some.hale.doc/resource#self

{"href": "http://some.hale.doc/resource"}

and again you can subselect
http://some.hale.doc/resource#self/href

"http://some.hale.doc/resource"

(Obviously this is just some thoughts...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions