mirror of
https://github.com/correl/openapi-core.git
synced 2024-12-29 11:09:25 +00:00
Allow empty value with default
This commit is contained in:
parent
9cf677eb46
commit
372f74f16e
3 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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': '',
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue