Fix consumer name length validator
This patch fixes a mismatch between the size of the column for a consumer "name" in the database and the value being checked by the api validator. The maximum size in the database is 36 chars [1], so we must use that value in the validator. [1] https://opendev.org/openstack/barbican/src/branch/stable/xena/barbican/model/models.py#L826 Story: 2009672 Task: 43931 Change-Id: I76f075a94056aa65cd44fd1d7f5d4b24109b6ed1 (cherry picked from commit31aa926175
) (cherry picked from commit059b4a080a
) (cherry picked from commitc1204779b2
) (cherry picked from commit06b4b32d20
) (cherry picked from commit4d619b4c95
)
This commit is contained in:
parent
3acf50a823
commit
459e321d55
|
@ -730,8 +730,8 @@ class ContainerConsumerValidator(ValidatorBase):
|
|||
self.schema = {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"URL": {"type": "string", "minLength": 1},
|
||||
"name": {"type": "string", "maxLength": 255, "minLength": 1}
|
||||
"URL": {"type": "string", "maxLength": 255, "minLength": 1},
|
||||
"name": {"type": "string", "maxLength": 36, "minLength": 1}
|
||||
},
|
||||
"required": ["name", "URL"]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixed Story #2009672 - Fixed validator for Container Consumers to prevent
|
||||
500 errors.
|
Loading…
Reference in New Issue