nelmio/NelmioApiDocBundle — pull request #218 by konradpodgorski (2013-07-17 18:46:06+00:00)
Title: Option to set requirements and parameters directly from ApiDoc annotation

Sometimes required parameters are not used through routing but still they are mandatory. I wanted to have API with

resource.json?foo=bar&something=else

format, that was possible through QueryParam annotation or requirements in routing BUT!

There was no way to set dataType or description

This PR solves problem for me.

Side note: if you want to declare e.g. _format requirement through Annotation or any other required parameter that is used in url ({foo} format) then it won't work. Because Bundle still overrides requirements and parameters after the constructor in ApiDoc is called. This might be solved in separate PR by adding check if given requirements or parameters was already defined. But generally shouldn't be a problem to anyone.