You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But the pattern docs say that without ^ and $ the pattern is a partial match, not a full string.
For a route, where the generated regex would require the specific, full string it might make sense to change the route describer to surround the requirement with ^...$.
Here's the regex that symfony generates on that route, for context:
Thoughts?
The text was updated successfully, but these errors were encountered:
The problem cannot even be solved by manual adding ^...$ like
#[Route('route/{id}', requirements: ['id' => '^\d+$'])]
// or
#[Route('route/{id<^\d+$>}')]
Due to Symfony Router converts all these variants to {^/route/(?P<id>\d+)$}sDu
Therefore, it is worth adding boundary conditions for correct UI validation. Is there any reason not to do this, other than not having a pull request?)
Given a route like this:
an open API schema gets generated where the path parameter looks like this:
But the pattern docs say that without
^
and$
the pattern is a partial match, not a full string.For a route, where the generated regex would require the specific, full string it might make sense to change the route describer to surround the requirement with
^...$
.Here's the regex that symfony generates on that route, for context:
Thoughts?
The text was updated successfully, but these errors were encountered: