scribe
scribe copied to clipboard
How to get examples for QueryParam of type int array working in Try it out?
Scribe version
4.33
Your question
Hi,
I'm having trouble getting the examples for an int[] query paremeter right.
My code:
#[QueryParam('product_ids', 'int', 'Array of target Product ids', true, [14617,14618])]
The example values are neither shown in the documentation for the parameter, nor included in the request when I press Try-it-out.
Things I tried:
-
#[QueryParam('product_ids', 'int', 'Array of target Product ids', true, '[14617,14618]')]
→ example shown, but doesn't work in try-it-out
Thank you!
Docs
- [X] I've checked the docs, the troubleshooting guide, and existing issues, but I didn't find a solution
Query params are tough, because there's no HTTP standard, so different platforms handle it differentl. But your type says int
. DId you try int[]
? Also, what does "does not work" mean? What does the API tester send?
#[QueryParam('cid', 'integer[]', '聯盟站點 cid,支持整型數組,[1,2<sup>31</sup>-1]', false, [3789, 5954])]