-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
website: Document Vagrant Cloud search API #10020
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Just a couple of questions/changes but overall looks good 🎉 🌮
* `provider` - (Optional) Filter results to boxes supporting for a specific provider. | ||
* `sort` - (Optional, default: `"downloads"`) The field to sort results on. Can be one of `"downloads"`, `"created"`, or `"updated"`. | ||
* `order` - (Optional, default: `"desc"`) The order to return the sorted field in. Can be `"desc"` os `"asc"`. | ||
* `limit` - (Optional, default: `10`) The number of results to return (max of TODO). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
max of TODO
should be fixed to whatever the max is
|
||
* `q` - (Optional) The search query. Results will match the `username`, `name`, or `short_description` fields for a box. If omitted, the top boxes based on `sort` and `order` will be returned (defaults to "downloads desc"). | ||
* `provider` - (Optional) Filter results to boxes supporting for a specific provider. | ||
* `sort` - (Optional, default: `"downloads"`) The field to sort results on. Can be one of `"downloads"`, `"created"`, or `"updated"`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is a better question for the corresponding website PR, but what gets returned when you provide a sort key that isn't supported? Is there a new HTTP response code that needs to be documented here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think right now it just ignores it, but I will check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validated now! Will return 400.
|
||
```json | ||
{ | ||
"boxes": [ |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
63c2839
to
3e0477c
Compare
Looking good, I think we're just missing the new HTTP 400 status code documented with the rest of the response codes. |
@briancain Switched this to be a 422 instead, see linked PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 ☁️
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
No description provided.