Skip to content

Commit

Permalink
fix: 将更多的 Java 基本类型处理为 JSONSchema 类型
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed May 31, 2021
1 parent 7384799 commit 46eb622
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,14 @@ export function processJsonSchema<T extends JSONSchema4>(jsonSchema: T): T {
// 映射为标准的 JSONSchema 类型
type =
({
byte: 'integer',
short: 'integer',
int: 'integer',
long: 'integer',
float: 'number',
double: 'number',
char: 'string',
void: 'null',
} as Record<string, JSONSchema4TypeName>)[type] || type
return type
})
Expand Down

0 comments on commit 46eb622

Please sign in to comment.