Skip to content

Commit fbc4cfc

Browse files
committed
add binary format to schema-definition resolver
1 parent cebacce commit fbc4cfc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/core/openapi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export type SchemaDefinition = {
22
type?: "string" | "number" | "boolean" | "array" | "object",
3-
format?: "date" | "unknown",
3+
format?: "date" | "binary",
44
description: string,
55
readOnly: boolean,
66
nullable: boolean,

src/core/resolvers/schema-definition.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ function resolveTuple(items: SchemaDefinition | SchemaDefinition[], length: numb
2929
}
3030

3131
export function resolveSchema(definition: SchemaDefinition): string {
32+
if (definition.format === "binary") return "File";
3233
// TODO: handle definition.format === "date"
3334
if (definition.type) {
3435
switch (definition.type) {

0 commit comments

Comments
 (0)