Open helio-frota opened 4 months ago
Hi I noticed that it successfully excludes the paths, but continues showing the warning in logs https://github.com/trustification/trustify/issues/261#issuecomment-2108509183
Hi @helio-frota,
Can you try to point your branch at main
of actix-web-prom
?
I just pushed the change below (I've linked the code entry) which should give me better visibility on the problem. As it stands it seems that the warning is appearing because the params passed to the endpoint aren't parsed properly but this should help.
@nlopes hi,
thanks for the feedback, I found the place where this happened https://github.com/nlopes/actix-web-prom/pull/83/files but I closed the PR since that was not a good way to fix
Hi @helio-frota,
Can you try to point your branch at
main
ofactix-web-prom
?I just pushed the change below (I've linked the code entry) which should give me better visibility on the problem. As it stands it seems that the warning is appearing because the params passed to the endpoint aren't parsed properly but this should help.
Okay I think this is my fault, in code introduced in #73.
The root issue is in the code that build a mixed pattern:
The full_pattern
variable is populated from req.match_pattern()
and my code is expecting to only have simple brace expression with only simple identifier.
The full_pattern
is then passed to the strfmt
crate that of course doesn't accept any wild card patterns like in the route matching pattern "/swagger-ui/{_:.*}"
The issue is that the way we parse the match pattern with strfmt
is different that the way that actix-web parse it.
The current code is a crappy workaround because actix-web doesn't expose the parsed match pattern.
So may be we should review if we can use or call the code in actix-web that parse the match pattern.
Hi, I'm excluding
swagger-ui
but I'm still seeing a warning in logsAm I using the correct approach? thanks