flask-swagger-ui | Swagger UI blueprint for flask | User Interface library
kandi X-RAY | flask-swagger-ui Summary
kandi X-RAY | flask-swagger-ui Summary
Swagger UI blueprint for flask
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Return a swagger UI object .
flask-swagger-ui Key Features
flask-swagger-ui Examples and Code Snippets
Community Discussions
Trending Discussions on flask-swagger-ui
QUESTION
I have used apispec and flask-swagger-ui with flask.
The flask route returns a html page but on swagger UI I could only see the html code not the actual page.
Is there any way to get the html page displayed on swagger UI.
the flask code along with the APIspec documentation
swagger UI response
expected response
...ANSWER
Answered 2021-Feb-28 at 18:57OpenAPI describes the text/code response your API will return. Swagger UI is correctly displaying the body of your response, not how that response will be interpreted and displayed by a particular consumer of your API (in this case a web browser). What you are trying to do is outside the intended scope of this tool. See this issue in which the developers rejected this idea for reasons of security.
Alternative:Use the description
property to include a link to additional documentation that includes images or screenshots of what this response would look like.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install flask-swagger-ui
You can use flask-swagger-ui like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page