Routes with optional params redirect to the docs home screen
Version: 0.7.0

When clicking the above route with an optional parameter {book?} rather than showing the documentation for the route it redirects home /docs/api#/.
It seems likely that the question mark is causing the issue..
Hey @dmason30
This is a problem indeed, however I'm not sure how to solve it.
So the reason here is not only the question mark, but Open API spec itself as well. Path parameters in Open API must be required. So I'm not sure how to solve it.
Have you had Open API documentation prior to using Scramble? If so, how'd you documented this case?
Thanks!
UPD: As a solution, Scramble can document 2 endpoints: /rates and /rates/{book}. This way docs will work.
Hey @dmason30
This is a problem indeed, however I'm not sure how to solve it.
So the reason here is not only the question mark, but Open API spec itself as well. Path parameters in Open API must be required. So I'm not sure how to solve it.
Have you had Open API documentation prior to using Scramble? If so, how'd you documented this case?
Thanks!
UPD: As a solution, Scramble can document 2 endpoints:
/ratesand/rates/{book}. This way docs will work.
This is my first time working with Open API, but after some research the way I think you describe of converting it to two endpoints seems to be the best option.
However. I am not sure how it would handle a more complex use case such as multiple optional params. But maybe have a simple solution first then try and figure the edge cases later for something like /foo/{bar?}/{baz?}. Would that end up needing to be three endpoints /foo , /foo/{bar} and /foo/{bar}/{baz}
Laravel does have a protected function getOptionalParameterNames which you could invoke via reflection to get all of the names from a route.