Skip to content

Commit

Permalink
Merge pull request #207 from Sacramentix/patch-1
Browse files Browse the repository at this point in the history
add autocompletion for media type
  • Loading branch information
AGalabov committed Mar 1, 2024
2 parents dc01991 + 2438fea commit 79a2907
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/openapi-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Record<ZodMediaType, ZodMediaTypeObject>>;

export interface ZodRequestBody {
description?: string;
Expand Down

0 comments on commit 79a2907

Please sign in to comment.