DarkaOnLine / L5-Swagger

OpenApi or Swagger integration to Laravel
https://github.com/DarkaOnLine/L5-Swagger
MIT License
2.64k stars 394 forks source link

Docs page is blank and errors in console #478

Closed adeel94mirza closed 2 years ago

adeel94mirza commented 2 years ago

Description:

Getting blank screen and below mentioned errors in console. I followed the installation and configuration instructions and successfully generated the docs on my local codebase. Once pushed on the server I got an error which was fixed by URL::forceScheme('https').

ERRORS

  1. The stylesheet https://www.didx.eu/docs/asset/swagger-ui.css?v=a0952f52b09a2dc0c182298b2ea69849 was not loaded because its MIME type, “text/html”, is not “text/css”.
  2. Uncaught SyntaxError: expected expression, got '<'
  3. Uncaught ReferenceError: SwaggerUIBundle is not defined

image

DarkaOnLine commented 2 years ago

I think this is your server configuration issues. We do set correct MIME types while serving assets: https://github.com/DarkaOnLine/L5-Swagger/blob/master/src/Http/Controllers/SwaggerAssetController.php#L28

Uncaught SyntaxError - Could be that you got bad version SwaggerUI repo