From c4103efcfdfa2015cba849e15c05cce7f63ced96 Mon Sep 17 00:00:00 2001 From: Greg Brown Date: Thu, 3 Oct 2024 17:45:43 -0400 Subject: [PATCH] Update WebService. --- README.md | 2 ++ kilo-server/src/main/java/org/httprpc/kilo/WebService.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 70841139e..5b9045143 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,8 @@ Method parameters may be any of the following types: * `java.time.Duration` * `java.time.Period` * `java.util.UUID` +* `java.net.URI` +* `java.nio.file.Path` * `java.util.List`, `java.util.Set`, array/varargs * `jakarta.servlet.http.Part` diff --git a/kilo-server/src/main/java/org/httprpc/kilo/WebService.java b/kilo-server/src/main/java/org/httprpc/kilo/WebService.java index fa766bbd0..9f85bf71f 100644 --- a/kilo-server/src/main/java/org/httprpc/kilo/WebService.java +++ b/kilo-server/src/main/java/org/httprpc/kilo/WebService.java @@ -33,6 +33,8 @@ import java.lang.reflect.Parameter; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; +import java.net.URI; +import java.nio.file.Path; import java.time.Duration; import java.time.Instant; import java.time.LocalDate; @@ -1260,6 +1262,8 @@ private TypeDescriptor describeRawType(Class type) { || type == Duration.class || type == Period.class || type == UUID.class + || type == URI.class + || type == Path.class || type == Part.class) { return new TypeDescriptor(type, true); } else if (type.isArray()) {