Skip to content

Conversation

junior-santana
Copy link
Contributor

@junior-santana junior-santana commented Jun 30, 2024

Pull Request

The issue or feature being addressed

Resolves #2881.

Details on the issue fix or feature implementation

Moved inline javascript to separate files
ReDoc: Moved inline CSS to separate file
SwaggerUi: Reused CSS file from the package

Middleware changes to respond with corresponding files

- Add/improve unit tests
- Define charset when serving js files
- Tidy up code

// Apply mandatory parameters
configObject.dom_id = "#swagger-ui";
configObject.presets = [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default config file also sets plugins: [SwaggerUIBundle.plugins.DownloadUrl]. I don't know what that does, but maybe it should be set here too?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we leave it as is, particularly if we don't know why it isn't there already.


// Apply mandatory parameters
configObject.dom_id = "#swagger-ui";
configObject.presets = [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we leave it as is, particularly if we don't know why it isn't there already.

@martincostello martincostello added this to the v6.7.0 milestone Jul 5, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jul 5, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.44%. Comparing base (9b7c0dd) to head (f4a9d42).
Report is 6 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2965      +/-   ##
==========================================
+ Coverage   90.34%   90.44%   +0.10%     
==========================================
  Files          72       74       +2     
  Lines        2839     2869      +30     
  Branches      446      452       +6     
==========================================
+ Hits         2565     2595      +30     
  Misses        274      274              
Flag Coverage Δ
Linux 90.44% <100.00%> (+0.10%) ⬆️
Windows 81.07% <20.00%> (-9.28%) ⬇️
macOS 90.44% <100.00%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Co-authored-by: Martin Costello <[email protected]>
This was referenced Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature request]: Remove inline code in Swagger UI index.html
4 participants