scribe icon indicating copy to clipboard operation
scribe copied to clipboard

How to get examples for QueryParam of type int array working in Try it out?

Open majortom731 opened this issue 11 months ago • 2 comments

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

majortom731 avatar Mar 18 '24 10:03 majortom731

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?

shalvah avatar Mar 26 '24 20:03 shalvah

#[QueryParam('cid', 'integer[]', '聯盟站點 cid,支持整型數組,[1,2<sup>31</sup>-1]', false, [3789, 5954])]

mikeah2011 avatar Apr 16 '24 11:04 mikeah2011