Skip to main content

Extend a FastAPI OpenAPI spec to include all possible HTTPException or custom Exception response schemas.

Project description

fastapi-docx

FastAPI

Add HTTPException responses to a FastAPI OpenAPI spec

CI Coverage Package version Supported Python versions


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.
Dependencies
  • Pydantic V2: From version 1.0 of fastapi-docx, Pydantic V2 is required. For Pydantic V1 support, use fastapi-docx version 0.2.
License

This project is licensed under the terms of the MIT license.

Project details


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-1.0.2.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

fastapi_docx-1.0.2-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_docx-1.0.2.tar.gz.

File metadata

  • Download URL: fastapi_docx-1.0.2.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.4 Darwin/23.5.0

File hashes

Hashes for fastapi_docx-1.0.2.tar.gz
Algorithm Hash digest
SHA256 fbd09515b9e3dcbb5895b26e7ea48a54e5f2ae48db6b43f09224dde98f6288ac
MD5 8648c23fb9fc2bc4a08271eae30e65ea
BLAKE2b-256 ac46e2b29063b6a583f2a1cad2e4db820223a2607c7d473d52d15e3d526894fc

See more details on using hashes here.

File details

Details for the file fastapi_docx-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: fastapi_docx-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.4 Darwin/23.5.0

File hashes

Hashes for fastapi_docx-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9fee6fa2d3400cfdba450e65d7967425e5f130e61622d2bd17843b880503eb0e
MD5 c44d39d755df9dfac07a5ed432f6d1dd
BLAKE2b-256 7da872dab8936fad63812172baaf3bba0ff01a7f98c94329b6ddfd2df6743407

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page