You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
in my opinion swagger-parser is not handling $ref correctly (see trace at the bottom). I tried with both python2.7 and python3.6. This relates to validate_request - definitions_example works fine.
Traceback (most recent call last):
File "config_validate_kumo.py", line 37, in <module>
parser.validate_request('/kumo', 'get', body=my_config)
File "/Users/fin0007m/devel/gcdt/bvenv/lib/python2.7/site-packages/swagger_parser/swagger_parser.py", line 713, in validate_request
is_ok, msg = self._validate_body_parameters(body, action_spec)
File "/Users/fin0007m/devel/gcdt/bvenv/lib/python2.7/site-packages/swagger_parser/swagger_parser.py", line 793, in _validate_body_parameters
if not self.validate_definition(definition_name, body):
File "/Users/fin0007m/devel/gcdt/bvenv/lib/python2.7/site-packages/swagger_parser/swagger_parser.py", line 508, in validate_definition
if not self._validate_type(properties_dict[key], value):
File "/Users/fin0007m/devel/gcdt/bvenv/lib/python2.7/site-packages/swagger_parser/swagger_parser.py", line 526, in _validate_type
return self.validate_definition(def_name, value)
File "/Users/fin0007m/devel/gcdt/bvenv/lib/python2.7/site-packages/swagger_parser/swagger_parser.py", line 508, in validate_definition
if not self._validate_type(properties_dict[key], value):
File "/Users/fin0007m/devel/gcdt/bvenv/lib/python2.7/site-packages/swagger_parser/swagger_parser.py", line 526, in _validate_type
return self.validate_definition(def_name, value)
File "/Users/fin0007m/devel/gcdt/bvenv/lib/python2.7/site-packages/swagger_parser/swagger_parser.py", line 503, in validate_definition
for key, value in dict_to_test.items():
AttributeError: 'list' object has no attribute 'items'
The text was updated successfully, but these errors were encountered:
markfink
changed the title
issue validating arrays: AttributeError: 'list' object has no attribute 'items'
issue resolving $ref: AttributeError: 'list' object has no attribute 'items'
Aug 9, 2017
in my opinion swagger-parser is
not handling $ref correctly
(see trace at the bottom). I tried with both python2.7 and python3.6. This relates tovalidate_request
-definitions_example
works fine.relevant part of my spec:
if I resolve the $ref manually it works fine:
The text was updated successfully, but these errors were encountered: