cog
5a4f61a2 - Add x-cog-accept MIME type annotation for Path/File input fields (#2863)

Commit
3 days ago
Add x-cog-accept MIME type annotation for Path/File input fields (#2863) * Add x-cog-accept MIME type annotation for Path/File input fields Add an 'accept' parameter to Input() that specifies allowed MIME types or file extensions for Path/File inputs. The Go static schema generator extracts this and emits it as 'x-cog-accept' in the OpenAPI schema, giving schema consumers (UIs, validators, API clients) visibility into what file types an input expects. Usage: Input(accept="image/*"), Input(accept="audio/wav,audio/mp3"), or Input(accept=".safetensors,.bin"). Using accept on non-Path/File types is a hard build error. * Set COG_STATIC_SCHEMA=1 in accept integration tests --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Anish Sahoo <anishsahoo2005@gmail.com>
Author
Parents
Loading