001package io.avaje.http.api;
002
003import java.lang.annotation.Retention;
004import java.lang.annotation.Target;
005
006import static java.lang.annotation.ElementType.FIELD;
007import static java.lang.annotation.ElementType.PARAMETER;
008import static java.lang.annotation.RetentionPolicy.RUNTIME;
009
010/**
011 * Define a default value for a form parameter or query parameter.
012 *
013 * <h4>Example</h4>
014 *
015 * <pre>{@code
016 *
017 * @Get("/forCustomer/{custId}")
018 * public List<Contact> getContacts(UUID custId, @Default("name") String orderBy) {
019 *   ...
020 * }
021 *
022 * }</pre>
023 */
024@Target(value = {PARAMETER, FIELD})
025@Retention(value = RUNTIME)
026public @interface Default {
027
028  /**
029   * The default value.
030   */
031  String value();
032
033}