-
Notifications
You must be signed in to change notification settings - Fork 37
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
Quirks of the /links endpoint #217
Comments
Good catch, this definitely needs a closer look.
I realize our own definitions do not make this distinction, but in my mind, there is a division between (1) "data that originates from the underlying database and thus pertains to materials in some way" vs. (2) "other data, i.e., protocol and metadata". To me, Entries were meant to exclusively be about data of type (1), whereas the But now that I look at the definitions, I see that they do not explicitly back this model up. But, this model would explain why I'm reluctant to require implementations to have to support filtering, pagination, etc. on the
I agree that it would be more consistent with |
I agree with this sentiment, and merely wanted to highlight the inconsistencies/shortcomings of the spec in this regard.
This makes sense. In the |
About your comment on the To my best understanding, the string you want to change is, in JSON API, meant to be a short identifier for the nature of the relationship, much like the field name of an attribute. I.e., I'm not sure "links" makes a lot of sense here, because then there wouldn't be any place to indicate that this indicates the default child database. (We do indeed use the type name for this field in relationships between database-related But now that you highlight this, "default" is very non-descriptive. Shouldn't it be, e.g., "default_child_database"? Nevertheless, based on your comments here, maybe we need to revisit our use of object types with regards to links? Given our otherwise rather structured association between types and endpoints, it is annoying that one would have to just know that objects of type Would it have been better to name the types, e.g.,
|
I like this - although there is some discrepancy between the text and your example here. Putting it in
The field/property name may be different from |
Concerning the last point in my OP:
In Materials-Consortia/providers#18 a happy misunderstanding has led to a solution: Introduce another allowed value for the |
I had actually forgotten about this discussion when I wrote essentially the same suggestion in Materials-Consortia/providers#18. At least I'm consistent. Looking at this, I'm seriously considering that it is worth it to try to push through a patch for this link-type mess before v1.0.0. Because changing these link types is not backward compatible, and will need a major version bump. The naming we have here isn't super great; we are suggesting to introduce jsonapi resource objects of type Also for But lets discuss the attributre vs. meta question. Why is |
Fully agree that this will require a major version bump, i.e., better to get it in before the final release of v1.
Yeah. At least we would call them
How about
I think that's the issue. I see it not as representing the link (or edge) itself, but rather the databases (or nodes). I.e., |
We have to carefully look over the language we use in these sections so that we distinctively phrase it as "jsonapi link objects" vs. "links resource objects", and maybe even add a clarifying note about this. Are we in agreement that links are not entries? (Because entries must stem from materials database data.)
I would buy what you are saying if we had named the endpoint and objects If we go for the alternative design you seem to suggest, we really should rather have a ~ This is a very consistent design. But it is also more complex than maintaining a list of So why don't we instead just accept that a
I don't think so?... Can you cite the text you read to say that one is not allowed to include a jsonapi relationship with an object of the same type as the object having the relationship? |
Yes, I agree with this sentiment.
You have convinced me in this. We should probably also include this "definition" in the spec.
Indeed, you're right, see json-api/json-api#1065. |
Some "final" agreement from the discussion held today:
Note: all URLs MUST always point to unversioned Note: provider lists will use Note: we remove |
Follows the discussion during the 2020 workshop Addresses Materials-Consortia#217
I have found some quirks in the spec concerning the
/links
endpoint and the Index meta-database, while in the process of adding these to the test server inoptimade-python-tools
.Quirky things the specification states about
/links
(either ex- or implicitly):/links
endpoint, nor is there a way to handle pagination. (This actually makes for some weird work-arounds in the implementation).providers.json
be supplied here for all OPTiMaDe implementations/databases? Or do we perhaps recommend to only show them in the Index meta-database?For the Index meta-database:
Under
/info
one MAY provide a default database usingrelationships
. However, this is done under the non-existingdefault
relationship-type:This should probably be renamed to reflect the endpoint where this related resource may be found, i.e.,
links
, or it should be renamed tochild
to reflect the related type. I am not completely sure which is the most appropriate according to JSON API. However, I would suggestlinks
.The text was updated successfully, but these errors were encountered: