connectome-neuprint / neuPrintHTTP

Implements connectomics REST interface
5 stars 2 forks source link

/custom/custom version string validation not working as intended #55

Open neomorphic opened 2 years ago

neomorphic commented 2 years ago

The neuprintHTTP server is supposed to accept a version string as part of the custom query payload.

{
    "cypher": "MATCH (n: Neuron) WHERE  n.bodyId in [5813108066] RETURN n.bodyId AS id, n.type AS type",
    "dataset": "hemibrain",
    "version": "v1.2.1"
}

There is no combination of strings that will pass the validation for the version, so we never use it. Instead, the version is passed in as part of the dataset string, eg:

"dataset": "hemibrain:v1.2.1",

Which leads to the latest bug, passing in the following dataset version will still return a 200 response and uses the data from the most recent dataset.

"dataset": "hemibrain:v9.9.9",

So, if you were trying to query an old dataset, say “v1.1” and you entered, “v1.1.0" you would end up with data from v.1.2.1

Presumably if there are multiple datasets on a server, like vnc & abg, then if you specified a version for one of those and the version number was not valid, you might search against the completely wrong dataset