requiredHTTPParameter = const HTTPRequiredParameter()

Marks an HTTPController property binding as required.

Bindings are often applied to responder method arguments, in which required vs. optional is determined by whether or not the argument is in required or optional in the method signature.

When properties are bound, they are optional by default. Adding this metadata to a bound controller property requires that it for all responder methods.

For example, the following controller requires the header 'X-Request-ID' for both of its responder methods:

    class UserController extends HTTPController {
      @requiredHTTPParameter
      @HTTPHeader("x-request-id")
      String requestID;

      @httpGet
      Future<Response> getUser(@HTTPPath("id") int id)
        async => return Response.ok(await getUserByID(id));

      @httpGet
      Future<Response> getAllUsers() async
         => return Response.ok(await getUsers());
    }