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
We can't add the regex definitions in the openapi yaml because openapi doesn't support them. Neither is there really a need for this, because the Openapi schema works fine as it is in the test.
The problem is that to guarantee correct routing within pyramid we need to: A. Either not use regexes in the path and rely on the order of the routes in pyramid. This isn't great and a bit prone to failure when the routes are included from other projects, or the routes are automatically added via scanning the @view_config (I think). B. Do use regexes in the path. This guarantees correct routing, but doesn't currently work with pyramid_openapi3.
I think pyramid_openapi3 could simply remove the regex definitions similar to how it removes the prefixes at
Should we instead raise an error in pyramid_openapi if we come up against a regex in view path? I'm a bit afraid of silently removing parts of the path, I prefer to be specific with an error saying "Hey, regex paths are not supported in OpenAPIv3 but you gave me a path with regex so I don't know what to do here, please fix".
Failing test here: Wim-De-Clercq@e15ebc3
We can't add the regex definitions in the openapi yaml because openapi doesn't support them. Neither is there really a need for this, because the Openapi schema works fine as it is in the test.
The problem is that to guarantee correct routing within pyramid we need to:
A. Either not use regexes in the path and rely on the order of the routes in pyramid. This isn't great and a bit prone to failure when the routes are included from other projects, or the routes are automatically added via scanning the
@view_config
(I think).B. Do use regexes in the path. This guarantees correct routing, but doesn't currently work with pyramid_openapi3.
I think pyramid_openapi3 could simply remove the regex definitions similar to how it removes the prefixes at
pyramid_openapi3/pyramid_openapi3/__init__.py
Lines 327 to 336 in 60e803a
Is this something you agree with?
The text was updated successfully, but these errors were encountered: