Skip to content

Commit 9869d15

Browse files
authored
Merge branch 'master' into bug/swagger-ui-3328
2 parents abc4bd1 + f62d383 commit 9869d15

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "swagger-client",
3-
"version": "3.0.16",
3+
"version": "3.0.17",
44
"description": "SwaggerJS - a collection of interfaces for OAI specs",
55
"main": "dist/index.js",
66
"repository": "[email protected]:swagger-api/swagger-js.git",

src/http.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ function formatValue({value, collectionFormat, allowEmptyValue}, skipEncoding) {
144144
if (typeof value === 'undefined' && allowEmptyValue) {
145145
return ''
146146
}
147-
if (isFile(value)) {
147+
148+
if (isFile(value) || typeof value === 'boolean') {
148149
return value
149150
}
150151

test/http.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,14 @@ describe('http', () => {
211211
},
212212
two: {
213213
value: 2
214+
},
215+
three: {
216+
value: false
214217
}
215218
}
216219
}
217220

218-
expect(encodeFormOrQuery(req.query)).toEqual('one=1&two=2')
221+
expect(encodeFormOrQuery(req.query)).toEqual('one=1&two=2&three=false')
219222
})
220223

221224
it('should handle arrays', function () {

0 commit comments

Comments
 (0)