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
When validating swagger, it's difficult to know which line of the swagger that is causing the issue. For example, my swagger spec had a type field with a list instead of a string. This was difficult to track in my swagger spec as there was only an error without any clues as to what the surrounding lines might look like. it would be helpful to print out part of the object that causes the error.
below is an example traceback:
...
File "/opt/venvs/swagger-tools/lib/python3.6/site-packages/swagger_spec_validator/validator20.py", line 171, in validate_spec
validate_definitions(definitions, bound_deref)
File "/opt/venvs/swagger-tools/lib/python3.6/site-packages/swagger_spec_validator/validator20.py", line 530, in validate_definitions
visited_definitions_ids=visited_definitions_ids,
File "/opt/venvs/swagger-tools/lib/python3.6/site-packages/swagger_spec_validator/validator20.py", line 501, in validate_definition
visited_definitions_ids=visited_definitions_ids,
File "/opt/venvs/swagger-tools/lib/python3.6/site-packages/swagger_spec_validator/validator20.py", line 501, in validate_definition
visited_definitions_ids=visited_definitions_ids,
File "/opt/venvs/swagger-tools/lib/python3.6/site-packages/swagger_spec_validator/validator20.py", line 501, in validate_definition
visited_definitions_ids=visited_definitions_ids,
File "/opt/venvs/swagger-tools/lib/python3.6/site-packages/swagger_spec_validator/validator20.py", line 472, in validate_definition
raise SwaggerValidationError('type must be a string; lists are not allowed (%s)' % swagger_type)
swagger_spec_validator.common.SwaggerValidationError: type must be a string; lists are not allowed (['string', 'null'])
The text was updated successfully, but these errors were encountered:
When validating swagger, it's difficult to know which line of the swagger that is causing the issue. For example, my swagger spec had a
type
field with a list instead of a string. This was difficult to track in my swagger spec as there was only an error without any clues as to what the surrounding lines might look like. it would be helpful to print out part of the object that causes the error.below is an example traceback:
The text was updated successfully, but these errors were encountered: