Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Swagger UI | Endpoints with Blueprints and MethodView
Professional Web API with Flask
course content

Course Content

Professional Web API with Flask

Professional Web API with Flask

1. Introduction to the Course
2. Database and Models
3. Flask-Smorest and Schemas
4. Endpoints with Blueprints and MethodView
5. Authentication with JWT
6. Deployment

bookSwagger UI

One more convenient built-in tool that assists in documenting our API is Swagger. Thanks to Swagger, we can easily describe the structure and functionality of our application. To integrate Swagger, a few additional configuration parameters need to be specified in the create_app() function within the app.py file.

First, we specify the path where we can find the documentation:

Second, we indicate the URL for the Swagger UI:

Now, let's navigate to our application in the browser and go to /swagger-ui to explore our documentation and test it. We see that all endpoints are listed. As we develop new endpoints, our documentation will automatically update. We can test our endpoints just as we did in Postman, the only difference being that we cannot save requests for repeated testing.

Excellent, we have enriched our knowledge with the skill to use another tool.

Note

The link lets you compare your code with the project's code on GitHub.

What role does Swagger-UI play in the API development process?

What role does Swagger-UI play in the API development process?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 4. Chapter 7
We're sorry to hear that something went wrong. What happened?
some-alt