swagger-api / swagger-api/swagger-ui
Swagger UI svg output showing the svg code as text instead of loading the image
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
I have an endpoint in Swagger UI. Its output should be an SVG image. But in the response, I'm getting the original SVG code instead of loading the image. How can I solve the issue?
I am using swagger UI NPM package(https://www.npmjs.com/package/swagger-ui) in my NodeJS App.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the SVG response in Swagger UI from the NodeJS application and inspect how the endpoint response is displayed. The issue names no source file or test, so first locate the response-rendering entry point and determine whether the SVG is treated as text. Done means the SVG response loads as an image rather than displaying its markup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100