mirror of
https://github.com/correl/openapi-core.git
synced 2024-11-29 03:00:12 +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:
|
if param.required:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
if not param.schema or not param.schema.default:
|
if not param.schema or param.schema.default is None:
|
||||||
continue
|
continue
|
||||||
raw_value = param.schema.default
|
raw_value = param.schema.default
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,13 @@ paths:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
nullable: true
|
nullable: true
|
||||||
|
- name: search
|
||||||
|
in: query
|
||||||
|
description: Search query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
allowEmptyValue: true
|
||||||
- name: ids
|
- name: ids
|
||||||
in: query
|
in: query
|
||||||
description: Filter pets with Ids
|
description: Filter pets with Ids
|
||||||
|
|
|
@ -137,6 +137,7 @@ class TestPetstore(object):
|
||||||
'query': {
|
'query': {
|
||||||
'limit': 20,
|
'limit': 20,
|
||||||
'page': 1,
|
'page': 1,
|
||||||
|
'search': '',
|
||||||
'ids': [12, 13],
|
'ids': [12, 13],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -212,6 +213,7 @@ class TestPetstore(object):
|
||||||
'query': {
|
'query': {
|
||||||
'limit': None,
|
'limit': None,
|
||||||
'page': 1,
|
'page': 1,
|
||||||
|
'search': '',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue