-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated Lumen code can contain dots in routes #6897
Comments
@philip yes, we should be able to fix it easily in the postProcessOperations. Is that something you can contribute? If yes, I can show you a good starting point. |
@wing328 I'm interested, all pointers are welcome. Also, thoughts on what to do here e.g., replace them with something, fail, or allow this to be configured somehow. |
My take is to throw an exception as it's something not supported by Lumen. As you mentioned we can replace it with something else but still the clients (PHP, Python, etc) generated from the spec expect the Please refer to https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/FinchServerCodegen.java#L210 on how we loop through all the path in |
@win328 I remember testing paths with dots and they failed, and removing the dots caused it all to work. However now I can't replicate this so am baffled and confused. Tested Lumen 5.2, 5.4, and 5.5. I switched to codegen on docker but don't understand how that'd change things. On the bright side the lumen generator is working for my use case so I hope to expand its general usage and functionality. Although I fear this bug will make a comeback but we'll see. Related, using Lumen 5.5 required other code updates but considering 5.5 is LTS I think it might be worth it. |
FYI. I've filed #6986 to throw an exception if dot is found in the path. |
same goes for laravel. |
Lumen does not allow
.
in routes. The generator allows them without warning. Dots in URLs are common though, for example/api/v1.1/
, but Lumen insists on not allowing them.Confirmation about dots being disallowed in routes: laravel/framework#6180
The text was updated successfully, but these errors were encountered: