diff --git a/http-api/src/main/java/io/avaje/http/api/PathTypeConversion.java b/http-api/src/main/java/io/avaje/http/api/PathTypeConversion.java index eff727720..1cd272f20 100644 --- a/http-api/src/main/java/io/avaje/http/api/PathTypeConversion.java +++ b/http-api/src/main/java/io/avaje/http/api/PathTypeConversion.java @@ -309,6 +309,20 @@ public static BigDecimal toBigDecimal(String value) { } } + /** + * Convert to BigInteger (allowing nulls). + */ + public static BigInteger toBigInteger(String value) { + if (isNullOrEmpty(value)) { + return null; + } + try { + return new BigInteger(value); + } catch (Exception e) { + throw new InvalidTypeArgumentException(e); + } + } + /** * Convert to Boolean (allowing nulls). */