8 – Are there reserved words / patterns in routing.yml files?


Of these only the last one executes the controller’s method. The rest return 404.

tam_api.genre.icon_png:
  path: '/icon/genre/{tid}/png'
  defaults: { _controller: 'Drupaltam_apiControllerTamGenre::iconToPng' }
  methods: [GET]
  options:
    parameters:
      tid:
        type: integer
    requirements:
      _access: 'TRUE'

tam_api.genres.icon_png:
  path: '/icon/genres/{tid}/png'
  defaults: { _controller: 'Drupaltam_apiControllerTamGenre::iconToPng' }
  methods: [GET]
  options:
    parameters:
      tid:
        type: integer
    requirements:
      _access: 'TRUE'

tam_api.genres.icons_png:
  path: '/icons/genres/{tid}/png'
  defaults: { _controller: 'Drupaltam_apiControllerTamGenre::iconToPng' }
  methods: [GET]
  options:
    parameters:
      tid:
        type: integer
    requirements:
      _access: 'TRUE'

tam_api.genre.icons_png:
  path: '/icons/genre/{tid}/png'
  defaults: { _controller: 'Drupaltam_apiControllerTamGenre::iconToPng' }
  methods: [GET]
  options:
    parameters:
      tid:
        type: integer
    requirements:
      _access: 'TRUE'

tam_api.genres.tam_png:
  path: '/tam/genres/{tid}/png'
  defaults: { _controller: 'Drupaltam_apiControllerTamGenre::iconToPng' }
  methods: [GET]
  options:
    parameters:
      tid:
        type: integer
  requirements:
    _access: 'TRUE'

I have no custom patterns configured in URL Aliases and it seems only the Group module is creating it’s own.

Why would 2 routes with the same settings except the path not both work?