summaryrefslogtreecommitdiff
path: root/src/main/java/foo/zaaarf/routecompass/Route.java
diff options
context:
space:
mode:
author zaaarf <me@zaaarf.foo>2024-01-19 15:40:29 +0100
committer zaaarf <me@zaaarf.foo>2024-01-19 15:40:29 +0100
commite858d2017270da7e87bbaf362af028f4b788d321 (patch)
treedb25197689124badd13c7712eb620d71eabf15e1 /src/main/java/foo/zaaarf/routecompass/Route.java
parentef3529336c64042f27f7a433d4ceb1990f5fb2d7 (diff)
feat: implemented parameter printing
Diffstat (limited to 'src/main/java/foo/zaaarf/routecompass/Route.java')
-rw-r--r--src/main/java/foo/zaaarf/routecompass/Route.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/main/java/foo/zaaarf/routecompass/Route.java b/src/main/java/foo/zaaarf/routecompass/Route.java
index ade19a6..f56de0b 100644
--- a/src/main/java/foo/zaaarf/routecompass/Route.java
+++ b/src/main/java/foo/zaaarf/routecompass/Route.java
@@ -12,8 +12,9 @@ public class Route {
public final String produces;
public final String consumes;
public final boolean deprecated;
+ public final Param[] params;
- public Route(String route, RequestMethod[] methods, MediaType consumes, MediaType produces, boolean deprecated) {
+ public Route(String route, RequestMethod[] methods, MediaType consumes, MediaType produces, boolean deprecated, Param... params) {
this.route = route;
StringBuilder methodStringBuilder = new StringBuilder("[");
@@ -33,5 +34,19 @@ public class Route {
else this.consumes = null;
this.deprecated = deprecated;
+
+ this.params = params;
+ }
+
+ public static class Param {
+ public final String typeFQN;
+ public final String name;
+ public final String defaultValue;
+
+ public Param(String typeFQN, String name, String defaultValue) {
+ this.typeFQN = typeFQN;
+ this.name = name;
+ this.defaultValue = defaultValue;
+ }
}
}