#453·paperclip

Regression in 0.7.1 for actix web & tail matches

Author: cetra3Created Aug 1, 2022Updated Mar 7, 2025

Looks like there has been a change to the way url path parameters are generated between 0.7.0 & 0.7.1. When using a tail match, which is normally defined by with a {param:.*} in the url, this now has broken output.

Here's an example config:

cfg.service(web::resource("/example/{filename:.*}").route(web::get().to(get_example)))

This matches anything that has the /example/ prefix, including any extra slashes etc..

Here's a diff of a service:

     "/example/{filename:.*}": {
       "get": {
         "operationId": "get_example",
         "parameters": [
           {
             "in": "path",
-            "name": "filename:.*",
+            "name": "filename",
             "required": true,
             "schema": {
               "type": "string"
             },
             "style": "simple"
           },

I would expect in this case the name still is filename:.*