Closed BeeMargarida closed 3 years ago
@joamag @gcandal Problem found while doing the endpoint in builds
Why wasn't this a problem for the existing endpoints?
Why wasn't this a problem for the existing endpoints?
The logo.
is not replaced by the REPLACE_REGEX substitution because it does employ the
The expression for the logo: ^/api/builds/(?P<name>[\@\+\:\.\s\w-]+)/logo.(?P<format>[\@\+\:\.\s\w-]+)$
The expression for the the example above before the fix: ^/api/builds/(?P<name>[\@\+\:\.\s\w-]+)/fonts/(?P<font>[\@\+\:\.\s\w-]+).(?P<format>[\@\+\:\.\s\w-]+)$
I can't approve this PR as this would create a huge level of regressions in other projects, we'll need to go with <regex:>
instead for this specific situation so something like /api/builds/<str:name>/fonts/<regex:font:[a-zA-Z0-9]>.<str:format>
@BeeMargarida @gcandal Sorry wrong syntax it should be something like /api/builds/<str:name>/fonts/<regex('[a-zA-Z0-9]+'):font>.<str:format>
/api/builds/<str:name>/fonts/<str:font>.<str:format>
the font and format are wrongly extracted, where the parameterSRGunmetal-Regular.fnt
results infont: SRGunmetal-Regular.f
andformat: t
..
from theREPLACE_REGEX
. All other routes with dots are working as supposed and the route mentiond above as well.