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

Support 'format' parameter for /web and /search #58

Open
dstillman opened this issue Nov 17, 2018 · 1 comment
Open

Support 'format' parameter for /web and /search #58

dstillman opened this issue Nov 17, 2018 · 1 comment

Comments

@dstillman
Copy link
Member

Requested in #51 (comment)

The main problem with this is that if there are no results, the export translators could fail or produce something unexpected. Generally there either should be results or it should return a 501 (e.g., if we don't recognize an identifier), but at least when text search is enabled (which we use internally for ZoteroBib, but isn't used elsewhere) a text search can result in a 200 with no results. So I'm not sure what we would do in that case, but if we're not using this parameter that could probably stay undefined. We'd need to verify that there aren't other cases (web translation that doesn't throw an error but also doesn't return results?) where an empty array could be returned.

@dhimmel
Copy link
Contributor

dhimmel commented Nov 17, 2018

Thanks @dstillman for following up.

It sounds like it would be fine to explicitly not support the combination of text search AND format. This feature could always be added later.

Another thought is that some of the output formats like CSL JSON do support 0 or more results. So in the case where someone wanted a text search returned as CSL JSON and there are no results, I'd expect an empty array to be returned. Not sure how many of the other formats support 0 citations.

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

No branches or pull requests

2 participants