Skip to content
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

testing zenodeo3 #1

Open
punkish opened this issue Oct 15, 2020 · 0 comments
Open

testing zenodeo3 #1

punkish opened this issue Oct 15, 2020 · 0 comments

Comments

@punkish
Copy link
Owner

punkish commented Oct 15, 2020

hola a todos,

cc @slint @tcatapano @gsautter @mguidoti @myrmoteras @teodorgeorgiev @millerjeremya

I have been working on Z3, and have reached a point where I think it would benefit from a few more eyes. Please help me test the latest bleeding edge version at http://test.zenodeo.org/

To be sure, there will be a lot of errors, even nonsense at times. I beg your indulgence – please try out the new syntax and report errors right here, a new issue for each error. The home page itself has the documentation. I have taken a lot of time writing the syntax examples so make sure to look at docs.

It is very impt to URL encode the queries. If you are using a browser to test, your browser should do the encoding automatically. If you are using a programmatic tool, make sure to URL encode the query. While you would normally use an http library or curl to make requests, you can try the following queries in your browser

http://test.zenodeo.org/v3/treatments?geolocation=near(units:kilometers, lat:0, lng:0)

http://test.zenodeo.org/v3/treatments?publicationDate=between(2018-10-11 and 2018-12-31)

http://test.zenodeo.org/v3/treatments?geolocation=within(radius:100, units:kilometers, lat:0, lng:0)

http://test.zenodeo.org/v3/treatments?authorityName=starts_with(Miller)

Check out the full syntax at http://test.zenodeo.org

The performance might (will) be sucky, esp for non-equality searches. I will work on optimizing that later. First, I want to smoke out all the errors. Also, I am continuing to test (discover errors myself) and make changes. So don’t be surprised if the carpet shifts under you.

The Zenodeo schema now follows JSON Schema specs v7 (https://json-schema.org/specification.html). Validation is performed for every query, but I have made the validation semi-strict. That is, all rules are enforced, but for some violations, valid defaults are silently supplied without throwing an error. Rules are not enforced for the data that the API produces. Maybe at some point that might be a separate side-project. For those interested in the schema, you can view it at http://test.zenodeo.org/documentation/json Under a key called path, you will see the routes to all the available resources. And under each resource, in get.parameters you will see the schema which also serves as the data-dictionary besides validating the inputs.

I look forward to your feedback. Many thanks all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant