mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
ensure that boolean fields are submited as boolean values when using json
This commit is contained in:
parent
572c69a509
commit
e5268e3f7f
@ -517,6 +517,11 @@
|
|||||||
value = $('.value', $(this)).val();
|
value = $('.value', $(this)).val();
|
||||||
|
|
||||||
if (value) {
|
if (value) {
|
||||||
|
// convert boolean values to boolean
|
||||||
|
if ('json' === bodyFormat && 'boolean' === $('.tuple_type', $(this)).val()) {
|
||||||
|
value = '1' === value;
|
||||||
|
}
|
||||||
|
|
||||||
// temporary save all additional/doubled parameters
|
// temporary save all additional/doubled parameters
|
||||||
if (key in params) {
|
if (key in params) {
|
||||||
doubledParams[key] = value;
|
doubledParams[key] = value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user