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
Is your feature request related to a specific problem? Or an existing feature?
Not really a problem, but I noticed something:
2 years ago Swagger UI removed their inline CSS and JavaScript from the index.html file. The current file is here, the reason for the change can be found in swagger-api/swagger-ui#7295
It would be nice if Swashbuckle.AspNetCore.SwaggerUI would also do it this way.
Describe the solution you'd like
The inline CSS can simply be replaced by a link to the index.css file, just like the original index.html does it now. This also has the benefit that future updates in the index.css file are available in Swashbuckle.AspNetCore.SwaggerUI automatically.
The inline JavaScript code in Swashbuckle.AspNetCore.SwaggerUI is heavily modified compared to the original code (now in the file swagger-initializer.js). The modified code could be extracted to a custom js file, but then SwaggerUIMiddleware would need to be changed to process that file instead of index.html.
Note: This might need additional consideration concerning Browser-side caching.
Additional context
The same might be true for Redoc UI, I haven't checked that.
The text was updated successfully, but these errors were encountered:
I think that would be a reasonable change to make provided it didn't break anything. Non-inlined files would be better from a Content Security Policy perspective for those who are concerned about such things.
Is your feature request related to a specific problem? Or an existing feature?
Not really a problem, but I noticed something:
2 years ago Swagger UI removed their inline CSS and JavaScript from the index.html file. The current file is here, the reason for the change can be found in swagger-api/swagger-ui#7295
It would be nice if Swashbuckle.AspNetCore.SwaggerUI would also do it this way.
Describe the solution you'd like
The inline CSS can simply be replaced by a link to the index.css file, just like the original index.html does it now. This also has the benefit that future updates in the index.css file are available in Swashbuckle.AspNetCore.SwaggerUI automatically.
The inline JavaScript code in Swashbuckle.AspNetCore.SwaggerUI is heavily modified compared to the original code (now in the file swagger-initializer.js). The modified code could be extracted to a custom js file, but then
SwaggerUIMiddleware
would need to be changed to process that file instead of index.html.Note: This might need additional consideration concerning Browser-side caching.
Additional context
The same might be true for Redoc UI, I haven't checked that.
The text was updated successfully, but these errors were encountered: