cog
76a26ff0 - Add x-cog-accept MIME type annotation for Path/File input fields

Commit
99 days ago
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.
Author
Committer
Parents
Loading