CenterForDigitalHumanities / CenterForDigitalHumanities/rerum_server_nodejs

API responses are getting muddy

Open
#132 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
3
Forks
6
Avg merge
1h 25m
Merged PRs (30d)
3

Description

We need to consider better requests to offer the cleaner responses. We've made some compromises for backward compatibility but not in a generic way. It may be good to find that way. One option would be something like `?responseContainer=new_obj` on the request so that we can default to returning the updated document or an array of them or put them inside ` { queryResults: [ results ] }` if the consuming application needs/prefers them that way.

This would mean we would only have to modify old requests to add the parameter and we would be accommodating future requests like metadata if someone wants back the original query, count of results, time to find, most recent, ordering, etc.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.