Problem/Motivation
I recently tried to implement a route of the format /openapi/{plugin_id}.{content_type}
to allow for a URL like /openapi/jsonapi.yaml
. This is supported upstream in Symfony but not in Drupal. (Similarly, you cannot have two parameters which are not separated by a slash, such as {a}{b}
.
Steps to reproduce
This is a Drupalism and confusing. Tackling the underlying constraints is a huge lift, but we should at least throw an exception when compiling routes when Drupal doesn't like the path.
Proposed resolution
Throw an exception when compiling route paths that we know aren't supported by Drupal, with a pointer to helpful docs.