-
Notifications
You must be signed in to change notification settings - Fork 11
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
Placeholder for ids is not consistent between services #39
Comments
That's also something I have found annoying. It would be great to unify this. Also, we should make it clearer how URL escaping works in these patterns. If an id contains special characters, are they going to be escaped before being inserted in the template? |
Escaping should be defined, especially when returning IRIs/URIs as IDs. We are looking to implement the Reconciliation API with linked data, so the ID is always an IRI. Or rather the local name of an IRI as I understand it, as the namespace is declared in the service manifest? Which is a bit of a problem when searching through data from mixed sources which might have mixed/different namespaces... |
If you are using entire IRIs as IDs, then you should be able to use templates without any prefix or suffix - that relies on the assumption that ids are not escaped when inserted in templates. The On top of my head I don't remember exactly what OpenRefine currently does concerning escaping. (It's probably not worth following - we just need to think about what the specs should be in an ideal world and then update OpenRefine to follow that.) |
That sounds like a good approach :-) |
In OpenRefine we are considering introducing escaping for the ids, so that would potentially break @metaschell's use case of using full URIs as ids: |
I think the approach to treat the
This is also what we do in our GND service, where we use the identifierSpace For the second part of #39 (comment) (and what @wetneb described in OpenRefine/OpenRefine#3730 (comment)):
I think actually supporting full URIs as IDs is conceptually quite a different approach from what is specified so far, in particular regarding the
This allows the client to offer further extension on extended entities. I also assumed that services with a common Basically my understanding of the spec is that a single reconciliation service is responsible for a single I'm not saying this is the only right way, and that using full URIs as IDs is something we can't do, but I think that's probably a separate, and larger issue. For the current spec, I think using |
Update obsoleted URI syntax RFC (2396 -> 3986) See #39
I've opened #71 for the encoding part of this issue, which can be resolved without changing the template syntax. We can then focus on the actual syntax consistency issue of |
Update obsoleted URI syntax RFC (2396 -> 3986) See #39
Perhaps the syntax could follow URI Template (RFC6570)? Of course the whole specification isn't required here but it at least provides a standard to work from. The expectations about escaping and interpolation are clear and well-documented. You can do stuff like |
Hey @Robsteranium that sounds like a really really good idea! |
I realized last week that the update in #71 is incompatible with the OpenCorporates endpoint. They use the following view URL template: I think we need to follow @Robsteranium's suggestion here, because I feel uncomfortable with breaking such a use case. |
The placeholders used to embed an entity id in the service URLs defined in the manifest differ between the services. These should be consistent, ideally choosing
{{id}}
over${id}
to avoid pitfalls in clients/language interpreting$
as replacement character within strings (which is kind of the point here as well, but still using this without explicitly providing the character, e.g. in a bash with CURL might lead to subtle and hard to spot errors...)The preview service (section 5.1) uses
{{id}}
as placeholder in the service description url:https://reconciliation-api.github.io/specs/latest/#preview-metadata
The flyout service (sections 6.1 and 6.5) uses
${id}
as placeholder in the service description url:https://reconciliation-api.github.io/specs/latest/#suggest-metadata
https://reconciliation-api.github.io/specs/latest/#flyout-services
This also affects the Manifest JSON schema defined in section A.1
https://reconciliation-api.github.io/specs/latest/#manifest-schema
The text was updated successfully, but these errors were encountered: