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

Swagger UISwagger 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?

Selecciona la respuesta correcta

¿Todo estuvo claro?

Sección 4. Capítulo 7
course content

Contenido del Curso

Professional Web API with Flask

Swagger UISwagger 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?

Selecciona la respuesta correcta

¿Todo estuvo claro?

Sección 4. Capítulo 7
some-alt