Open frafra opened 1 year ago
@frafa - sorry for the extremely long delay in looking at this.
If this is still relevant, could you give an example of how it would work? The view_url
is defined in the service manifest, but it only defines it as <dbname>/<tablename>/{{id}}
. The services that implement the reconciliation API (e.g. OpenRefine) are responsible for working out the URL from the ID that is given.
Is it that the ID returned by the query response should be tilde-encoded by default? I'm in two minds about this - on the one hand it would help for reconstructing the URL, but it might not be the right thing to do for other uses of the ID outside of datasette where it might be important that the slash remains. I'm not sure there's an easy way to make this user-configurable and still stay within the reconciliation API schema.
Hi! Thanks for sharing such a useful plugin :)
I found out that IDs containing special characters are not escaped correctly in the URL when the endpoint is datasette itself (which is the default). For example, datasette will fail to load
http://localhost/db/table/FA3/N/819
, but it would work withhttp://localhost/db/table/FA3~2FN~2F819
I think an alternative variable should be made available, which is escaped according to Datasette, which should also be the default.
-- https://github.com/simonw/datasette/blob/f0fadc28ddb9f82e5cc1ecaa51e8a342eb6dc528/datasette/utils/__init__.py#L1166-L1168