Closed dhimmel closed 4 years ago
Hi, let me recover the link to another issue around this same topic, that will shed light at 'case insensitive' resolution of compact identifiers except for those cases where 'namespaceEmbeddedInLui' is 'true', which means the LUI is being used to hit the resolver, and, therefore, the regex must match. For the given example, the regular expression is
^DOID\\:\\d+$
so the LUI looks like DOID:
Okay so prefixes are case insensitive when namespaceEmbeddedInLui
is false, but case sensitive when namespaceEmbeddedInLui
is true?
It would probably simplify things for users if all compact IDs could be resolved with any prefix capitalization.
When namespaceEmbeddedInLui
is true, how do you figure out the required casing? It sounds like casing is reverse engineered from the regex. It seems like a tool like exrex
in Python could create a matching string from a pattern, but it's not a straightforward process.
It seems like the frontend provides the required casing information:
Compare to the vario
namespace data from the API:
"prefix" : "vario",
"pattern" : "^VariO:\\d+$",
"sampleId" : "0294",
"namespaceEmbeddedInLui" : true,
So the website provides a "sample compact identifier" with a resolvable compact ID and the required casing. Also the prefix here shows the required casing.
What's the best way to generate this information from the API? Is the code that identifiers.org uses to determine required casing available? Should the API include the convenience fields from the website?
I am confused about when prefixes are case sensitive. For example, both capitalization of the
geo
prefix resolve:But for the following:
Looks like the lowercase version violates the regex (see also https://github.com/identifiers-org/identifiers-org.github.io/issues/99)?
However, when looking up the prefixes, I must user lowercase (otherwise 404):
If we look at the
doid
prefix metadata, how does one deduce that only an ALL_CAPS prefix will be accepted during resolution?Is there a missing field like "prefixCapitalization" that would allow applications to know whether to submit resolution requests with a lowercase or uppercase prefix for a given namespace?