axnsan12 / drf-yasg

Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code.
https://drf-yasg.readthedocs.io/en/stable/
Other
3.4k stars 437 forks source link

Update redoc.min.js sourceMapURL to point to correct map path #860

Closed anthonyalmarza closed 1 year ago

anthonyalmarza commented 1 year ago

When running manage.py collectstatic on a project that also uses whitenoise automated builds will break due to an incorrect sourceMapURL path. The following error is reported.

whitenoise.storage.MissingFileError: The file 'drf-yasg/redoc-old/redoc.min.map' could not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage object at 0x7f9f03d5ed10>.

The JS file 'drf-yasg/redoc-old/redoc.min.js' references a file which could not be found:
  drf-yasg/redoc-old/redoc.min.map

Please check the URL references in this JS file, particularly any
relative paths which might be pointing to the wrong location.

A workaround is to copy the related statics maintained here into your own project (fixing the path of course).

JoelLefkowitz commented 1 year ago

Completed in #859 thanks @anthonyalmarza!