Kind: Interface
Source: atloria-monorepo/libs/parser-core/src/openapi/multipart.ts
multipart/form-data detection → OpenAPI request bodies.
Every framework parser walked file-upload handlers as if they took JSON, so an endpoint
declared with @UseInterceptors(FileInterceptor('file')) published as
content: { 'application/json': … }. A reader given that spec draws a JSON body editor and
cannot perform the upload at all — format: binary is the single token that makes it draw a
file picker instead, and nothing in the pipeline was ever emitting one.
Detection is deliberately TEXT-based and scoped to the smallest slice that can carry the signal (a handler's decorators + signature, a route's middleware arguments, a view body). The signals are literal by nature — the interceptor/middleware call NAMES the wire field — so a regex over a bounded slice reads them exactly, in every language, without needing a per-language type checker. The narrow slice is what keeps false positives out: mislabelling a JSON endpoint as an upload is worse than the bug being fixed, since it replaces a working body editor with a file picker that cannot send the request.
Properties
| Property | Type |
|---|---|
name | string |
kind | `'file' |
multiple | boolean |
required | boolean |
type | string |
Was this page helpful?