SafeString causes yaml.representer.RepresenterError for SpectacularAPIView and SpectacularRedocView #802
Labels
bug
Something isn't working
fix confirmation pending
issue has been fixed and confirmation from issue reporter is pending
We use
format_html("somestring")
ashelp_text
in some of our models which returns an object ofdjango.utils.safestring.SafeString
type.SpectacularAPIView
andSpectacularRedocView
both fail to build schema for these models, failing with the same error:yaml.representer.RepresenterError: ('cannot represent an object', 'somestring')
SpectacularSwaggerView
handles this object properly and does not produce any errors.I have found the related issue in the drf-yasg project. Maybe this could help.
The text was updated successfully, but these errors were encountered: