Skip to content

Commit 4b3ddff

Browse files
committed
fix:bugs
1 parent 5257b79 commit 4b3ddff

File tree

1 file changed

+19
-19
lines changed
  • media/src/components/APIPage/APIDebugger

1 file changed

+19
-19
lines changed
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
export const getCustomWidget = (schema): string => {
2-
if (schema?.type === 'array') {
2+
if (schema?.type === "array") {
33
// if (schema.items?.type === 'string' && schema?.widget === 'stringList') {
44
// return 'stringList';
55
// }
6-
return 'list';
6+
return "list";
77
}
8-
if (schema?.type === 'string') {
8+
if (schema?.type === "string") {
99
if (schema?.isFileTransferUrl) {
10-
return 'fileTypeSelect';
10+
return "file";
1111
}
12-
if (schema?.format === 'binary') {
13-
return 'file';
12+
if (schema?.format === "binary") {
13+
return "file";
1414
}
1515
if (schema?.enum || schema?.enumValueTitles) {
16-
return 'enum';
16+
return "enum";
1717
}
18-
return 'string';
19-
} else if (schema?.type === 'boolean') {
20-
return 'booleanSwitch';
21-
} else if (schema?.type === 'object' && schema?.additionalProperties) {
22-
return 'map';
23-
} else if (schema?.type === 'object' && !schema?.properties) {
24-
return 'json';
25-
} else if (schema?.type === 'any') {
26-
return 'typeSelect';
18+
return "string";
19+
} else if (schema?.type === "boolean") {
20+
return "booleanSwitch";
21+
} else if (schema?.type === "object" && schema?.additionalProperties) {
22+
return "map";
23+
} else if (schema?.type === "object" && !schema?.properties) {
24+
return "json";
25+
} else if (schema?.type === "any") {
26+
return "typeSelect";
2727
} else if ((schema?.ref || schema?.$ref) && !schema?.properties && !schema?.items) {
28-
return 'struct';
28+
return "struct";
2929
}
3030
// else if (schema?.type === 'number' || (schema?.type === 'integer' && schema?.format === 'int64')){
3131
// return "string"
3232
// }
33-
return '';
34-
};
33+
return "";
34+
};

0 commit comments

Comments
 (0)