Skip to content

Commit

Permalink
FastAPI docs formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
p1c2u committed Feb 13, 2024
1 parent fcddf6b commit 3221983
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions docs/integrations/fastapi.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FastAPI
=========
=======

This section describes integration with `FastAPI <https://fastapi.tiangolo.com>`__ ASGI framework.

.. note::

FastAPI also provides OpenAPI support. The main difference is that, unlike FastAPI's code-first approach, OpenAPI-core allows you to laverage your existing specification that alligns with API-First approach. You can read more about API-first vs. code-first in the [Guide to API-first](https://www.postman.com/api-first/).
FastAPI also provides OpenAPI support. The main difference is that, unlike FastAPI's code-first approach, OpenAPI-core allows you to laverage your existing specification that alligns with API-First approach. You can read more about API-first vs. code-first in the `Guide to API-first <https://www.postman.com/api-first/>`__.

Middleware
----------
Expand Down Expand Up @@ -47,10 +47,14 @@ Response validation
You can skip response validation process: by setting ``response_cls`` to ``None``

.. code-block:: python
:emphasize-lines: 2
:emphasize-lines: 5
app = FastAPI()
app.add_middleware(FastAPIOpenAPIMiddleware, openapi=openapi, response_cls=None)
app.add_middleware(
FastAPIOpenAPIMiddleware,
openapi=openapi,
response_cls=None,
)
Low level
---------
Expand Down

0 comments on commit 3221983

Please sign in to comment.