diff --git a/src/openapi-registry.ts b/src/openapi-registry.ts index 0c872f2..debb9b6 100644 --- a/src/openapi-registry.ts +++ b/src/openapi-registry.ts @@ -77,9 +77,10 @@ export interface ZodMediaTypeObject { encoding?: EncodingObject; } -export interface ZodContentObject { - [mediaType: string]: ZodMediaTypeObject; -} +// Provide autocompletion on media type with most common one without restricting to anything. +export type ZodMediaType = 'application/json' | 'text/html' | 'text/plain' | 'application/xml' | string & {}; + +export type ZodContentObject = Partial>; export interface ZodRequestBody { description?: string;