Extend a FastAPI OpenAPI spec to include all possible HTTPException or custom Exception response schemas.
Project description
fastapi-docx
Add HTTPException responses to a FastAPI OpenAPI spec
Documentation: https://saran33.github.io/fastapi-docx
Source Code: https://github.com/Saran33/fastapi-docx
FastAPI-docx extends the FastAPI OpenAPI spec to include all possible HTTPException
or custom Exception response schemas that may be raised within path operations.
The key features are:
- Document Exception Responses: Automatically find all possible respones within path operations, whether they originate from a
HTTPException
raised by the endpoint function directly, in a nested function, class method, or callable class instance, or by the fastAPI dependency-injection system. - Include Custom Exceptions: Optionally find and document any custom Exception types if using custom Exception handlers in your FastAPI application.
- Generate Exception schemas: A default
HTTPExceptionSchema
will be added to the OpenAPI specification. The default can be modified to use any other Pydantic model. An additional schema for app-specific custom Exceptions can also be included.
License
This project is licensed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fastapi_docx-0.1.3.tar.gz
(7.5 kB
view hashes)
Built Distribution
Close
Hashes for fastapi_docx-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c06b25de503428decd45a4ab9d14427eb9b202e9cf2d435a6bdc60579f443bc8 |
|
MD5 | 3eeddcfe5235cbf43263a27ee019cfa7 |
|
BLAKE2b-256 | 27ba8154774c3e1941d9ece7977d3181290e85b658c5fe3b08ad5eba08221141 |