flask-restful-swagger icon indicating copy to clipboard operation
flask-restful-swagger copied to clipboard

Drop-down not auto-populating

Open quattro opened this issue 10 years ago • 3 comments

I have a query parameter that accepts a boolean value.

In the generated swagger page the associated drop-down box is not populated with "True" or "False".

quattro avatar Jan 20 '14 22:01 quattro

This seems like a problem in the HTML page, but not in the generated json spec. In the spec you can see that the data type is indeed a boolean.

It is probably this: https://github.com/wordnik/swagger-ui/issues/279

rantav avatar Jan 21 '14 09:01 rantav

Just like the original Swagger issue, the field still isn't POSTed. I can see 3 values now: an empty value, 'true' and 'false'. However, upon hitting "Try it out" it isn't sent in the query string.

It looks like there is a fix from wordnik/swagger-ui#248

quattro avatar Jan 21 '14 18:01 quattro

Hi, I'm sorry I'm caught up in somehting, I'll be able to have a look later. Just to state the obvious - this is a UI bug - not a bug in the spec, and the UI is an optional feature in swagger. Anyway, I'll have a look at this later. Simply pulling the fix you pointed at would not work as there are other diffs (but thanks for the pointer, indeed it is helpful)

rantav avatar Jan 22 '14 19:01 rantav