Skip to content

Commit 6146640

Browse files
🦺 Validate status codes are strings.
1 parent 94c0871 commit 6146640

File tree

1 file changed

+2
-0
lines changed
  • src/lapidary/render/model/openapi

1 file changed

+2
-0
lines changed

‎src/lapidary/render/model/openapi/base.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ def validate(cls, value: typing.Any, info: pydantic.ValidationInfo):
4848

4949
pattern_props = {}
5050
for key, item in value.items():
51+
if not isinstance(key, str):
52+
raise ValueError(key)
5153
if pattern.search(key):
5254
pattern_props[key] = item
5355
for key in pattern_props:

0 commit comments

Comments
 (0)