Skip to content

Commit

Permalink
Handle Time type
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <[email protected]>
  • Loading branch information
Xtansia committed Jun 6, 2024
1 parent 3714fa7 commit 1cb8389
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ private Type mapTypeInner(OpenApiSchema schema) {
case Array:
return mapArray(schema);
case String:
if (schema.getPattern().map("^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$"::equals).orElse(false))
return Types.Client.OpenSearch._Types.Time;
return Types.Java.Lang.String;
case Boolean:
return Types.Primitive.Boolean;
Expand Down

0 comments on commit 1cb8389

Please sign in to comment.