Skip to content

ASR1015/Fastapi-form-field-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 

Repository files navigation

FastAPI Form Field Metadata Bug

This repository demonstrates a bug in FastAPI where form field metadata (like description) is lost when using Depends.

๐Ÿ› Problem

When using Form() inside a dependency function with Depends, the metadata provided (e.g., description) does not appear in the OpenAPI schema.

๐Ÿ“ Files

  • form_dependency_test.py: Demonstrates the issue using Depends
  • form_metadata_repro.py: Shows correct behavior when not using Depends

โ–ถ๏ธ How to Run

  1. Install dependencies:
    pip install fastapi uvicorn

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages