From 51ca88fe460852e73bbcc8c45c926daccdabc2e6 Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Wed, 7 Jun 2023 14:10:22 +0300 Subject: [PATCH] Add more documentation to @RestHeader This is needed because otherwise users can get confused about what the actual HTTP header being used Closes: #33861 (cherry picked from commit b7df405aff11c8dd1b17d539d098c6ede1d6d127) --- .../main/java/org/jboss/resteasy/reactive/RestHeader.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/RestHeader.java b/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/RestHeader.java index 2fd5bacab57e3..a78e4b87653b8 100644 --- a/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/RestHeader.java +++ b/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/RestHeader.java @@ -7,6 +7,11 @@ /** * Equivalent of HeaderParam but with optional name. + *

+ * When the name is not specified, then the parameter name is converted to kebab case + * while the first letter of every part of the kebab is made uppercase. + *

+ * For example {@code @RestHeader String iAmTheParam} results in the value of the HTTP header {@code I-Am-The-Param} being used. */ @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.FIELD, ElementType.PARAMETER })