Open ricardocamposilva opened 5 years ago
Same problem here. I use semantic_version in my django project and it expects a string, so the swagger page will not render after an Internal Server Error is thrown. The error states, "TypeError: expected string or bytes-like object".
You should set
default_version
to a string and not an integer.Originally posted by @axnsan12 in https://github.com/axnsan12/drf-yasg/issues/375#issuecomment-501496456
Still getting:
SwaggerValidationError at /ws/docs/swagger spec validation failed: {'ssv': '("1 is not of type \'string\'\\n\\nFailed validating \'type\' in schema[\'properties\'][\'info\'][\'properties\'][\'version\']:\\n {\'description\': \'A semantic version number of the API.\',\\n \'type\': \'string\'}\\n\\nOn instance[\'info\'][\'version\']:\\n 1", <ValidationError: "1 is not of type \'string\'">)'}
if you want more detailed traceback follows below: