Skip to content

Commit

Permalink
Update JSON schema for multiple types to use anyOf (#5396)
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig authored Apr 21, 2023
1 parent 10d2839 commit a65f035
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/api/src/utils/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ function getJsonSchemaItem(schema: Schema): JsonSchema {
return {type: "array", items: {type: "string"}};

case Schema.UintOrStringRequired:
return {type: ["string", "integer"]};
return {anyOf: [{type: "string"}, {type: "integer"}]};
case Schema.UintOrStringArray:
return {type: "array", items: {type: ["string", "integer"]}};
return {type: "array", items: {anyOf: [{type: "string"}, {type: "integer"}]}};

case Schema.Object:
return {type: "object"};
Expand Down

0 comments on commit a65f035

Please sign in to comment.