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

Document that current user's bookings are returned if zones AND user are not specified #140

Open
w-le opened this issue Jan 11, 2022 · 5 comments · Fixed by #144
Open

Document that current user's bookings are returned if zones AND user are not specified #140

w-le opened this issue Jan 11, 2022 · 5 comments · Fixed by #144
Assignees
Labels
priority: low type: documentation improvements or additions to documentation type: enhancement new feature or request

Comments

@w-le
Copy link
Contributor

w-le commented Jan 11, 2022

https://placeoscalendar.docs.apiary.io/#reference/0/bookings/query-bookings

Either zones OR user MUST be specified. Otherwise there is no search criteria. The system will NOT search ALL bookings across all zones when zones is not supplied

Currently when the request is made when zones and user are not specified, the result will ALWAYS be [] because nothing is being searched. This is not obvious to the end user though.

A better response would be something like "400: Either zones or user param MUST be specified"

Currently, when the request is made when zones and user are not specified, the result will return the current user's bookings.
This behaviour should be documented in the API reference.

@w-le
Copy link
Contributor Author

w-le commented Jan 11, 2022

@stakach can help @chillfox with this one

@w-le w-le changed the title query bookings: return 400 is zones AND user is not specified query bookings: return 400 if zones AND user is not specified Jan 11, 2022
@w-le w-le changed the title query bookings: return 400 if zones AND user is not specified query bookings: return 400 if zones AND user are not specified Jan 11, 2022
@chillfox
Copy link
Contributor

Hi @w-le,
Looks like it returns the bookings for the current user when no user or zones are specified.
Could take a look at this test and see what is different?

ee1699e

@w-le
Copy link
Contributor Author

w-le commented Jan 17, 2022

That is intuitive behaviour actually. So yeah if it's confirmed that that is working as expected then no code change is required, we'll just update the apiary and any other documentation to let end users know

@caspiano
Copy link
Contributor

@w-le would you prefer if I open a tracking issue for any relevant documentation changes, or just reopen this one?

@w-le
Copy link
Contributor Author

w-le commented Jan 18, 2022 via email

@caspiano caspiano reopened this Jan 18, 2022
@caspiano caspiano added the type: documentation improvements or additions to documentation label Jan 18, 2022
@caspiano caspiano changed the title query bookings: return 400 if zones AND user are not specified Document that current user's bookings are returned if zones AND user are not specified Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low type: documentation improvements or additions to documentation type: enhancement new feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants