Expose parameter names as String constants
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / RestconfQueryParam.java
index f3f43996dd282a2af8e964ded34f83c367bcfc83..f14a72095de992338c6df8b77bf5e18af4e51b2a 100644 (file)
@@ -13,6 +13,14 @@ import org.opendaylight.yangtools.concepts.Immutable;
 /**
  * Interface implemented by all Java classes which represent a
  * <a href="https://datatracker.ietf.org/doc/html/rfc8040#section-4.8">RESTCONF query parameter</a>.
+ *
+ * <p>
+ * Implementations of this interface are required to expose a {@code public static @NonNull uriName} constant, which
+ * holds the well-known URI Request Query Parameter name of the associated definition.
+ *
+ * <p>
+ * This naming violates the usual Java coding style, we need it to keep API consistency as an enum can be used as an
+ * implementation, in which case users could be confused by upper-case constants which are not enum members.
  */
 // FIXME: sealed when we have JDK17+?
 public interface RestconfQueryParam<T extends RestconfQueryParam<T>> extends Immutable {