What does a value like node:{node_type} mean? I'm trying to fully understand Drupal 8 routing. I understand the basics, no problem, but some of the finer details are still a mystery.

Here's the route for adding a node from the node module.

node.add:
  path: '/node/add/{node_type}'
  defaults:
    _controller: '\Drupal\node\Controller\NodeController::add'
    _title_callback: '\Drupal\node\Controller\NodeController::addPageTitle'
  requirements:
    _node_add_access: 'node:{node_type}'
  options:
    _node_operation_route: TRUE
    parameters:
      node_type:
        with_config_overrides: TRUE


I'm struggling with the line _node_add_access: 'node:{node_type}'.

I understand what the _node_add_access key does. It refers to a service with a tag of applies_to: _node_add_access. That is provided by the NodeAddAccessCheck class.

What does the node:{node_type} do?  No amount of tracing through code has answered that for me. It looks to be a unique value for some purpose. Is it related to caching?

I haven't got to the options stuff yet.

Thanks

EDIT: I'm not sure if this should be an answer but these applies_to requirements seem to be read in Drupal\Core\Access\CheckProvider::applies and the value (e.g. node:{node_type}) doesn't seem to be used at all.
That definition isn't about what is passed to NodeAddAccessCheck, that is solely defined by the slug definition in the path and the type hinted argument.

Instead, it is configuration for its implementation. Which it doesn't actually use. So yes, it is pointless. See \Drupal\Core\Entity\EntityCreateAccessCheck for an access check that actually uses that definition to dynamically get the value it wants from the route match parameters.

I suppose this initially used that and was switch to a different implementation, without removing the now unnecessary configuration.