-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenAPI Example with multipart/form-data not showing up #10999
Labels
bug
Something isn't working
Comments
Using from typing import Annotated
from fastapi import FastAPI, UploadFile, Form, File
# Run using uvicorn main:app --reload
# Visit: http://127.0.0.1:8000/docs
app = FastAPI()
@app.post("/form-test")
async def form_test(
str_data: Annotated[str, Form(json_schema_extra={"example": "test"})],
file: Annotated[UploadFile, File()],
):
return But using only |
Kludex
added
bug
Something isn't working
and removed
question
Question or problem
labels
Jan 21, 2024
@Kludex Alias in |
|
Seems like currently you can specify |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussed in #10937
Originally posted by SeeRich January 11, 2024
First Check
Commit to Help
Example Code
Description
The
HELLO
example is not shown in the docs.Operating System
Windows
Operating System Details
No response
FastAPI Version
0.108.0
Pydantic Version
2.5.3
Python Version
3.11.3
Additional Context
No response
The text was updated successfully, but these errors were encountered: