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
[ISSUE-739] ApiDoc parameters setting will override lower parameter definitions in the hierarchy #740
Conversation
I'm using the parameters setting which is read from the ApiDoc annotation and merge it in the end on top of all other parameters definitions that have been read from lower annotations in the hierarchy. Sadly I can't prove in my test that I override an already read parameter definition, because they are empty. In my production code the JMSMetaDataParser will already fill the annotation::parameters property. I'm not sure why they are empty in the tests. Since the handler is registered. |
that was fast :p |
I already wrote it but wanted to create an issue about it first. |
arf, that's a bit sad indeed. could you look at why there is no information available from the JMSMetaDataParser? |
The properties weren't available because of some Groups setting in the annotation. I think in general this needs some more improvement to work with nested objects. |
Added a new test which tests and shows how to use the properties ApiDoc setting on nested objects.
|
great. if tests are all green, could you please squash your commits? |
This patch would enable people to overwrite the parameters in the docs in their controller method ApiDoc annotation. The parameters only represent the "input". Would it be interesting to have the same feature for the "output"? With this patch I am able to tell developers that use my API that I expect an array in my PUT request (which is internally a CustomFooCollection), but for my GET request where the developers fetch the same resource, I have no possibility to tell them I return a simple array (which is internally a CustomFooCollection) and currently represented in my Return parameter list as CustomFooCollection. If this would be interesting for the project, I'm willing to provide a separate patch for it. |
I'm not sure about it. Let's postpone this idea. |
definitions in the hierarchy
Alright! I squashed the commits into one feature commit. |
[ISSUE-739] ApiDoc parameters setting will override lower parameter definitions in the hierarchy
thanks! |
Patch for #739