Allow empty value with default

This commit is contained in:
Artur Maciag 2017-10-19 12:28:28 +01:00
parent 9cf677eb46
commit 372f74f16e
3 changed files with 10 additions and 1 deletions

View file

@ -70,7 +70,7 @@ class RequestParametersFactory(BaseRequestFactory):
if param.required:
raise
if not param.schema or not param.schema.default:
if not param.schema or param.schema.default is None:
continue
raw_value = param.schema.default

View file

@ -34,6 +34,13 @@ paths:
type: integer
format: int32
nullable: true
- name: search
in: query
description: Search query
schema:
type: string
default: ""
allowEmptyValue: true
- name: ids
in: query
description: Filter pets with Ids

View file

@ -137,6 +137,7 @@ class TestPetstore(object):
'query': {
'limit': 20,
'page': 1,
'search': '',
'ids': [12, 13],
}
}
@ -212,6 +213,7 @@ class TestPetstore(object):
'query': {
'limit': None,
'page': 1,
'search': '',
}
}