Skip to content
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

All parameters are merged from bottom to top, but parameters option in ApiDoc annotation is ignored #739

Closed
fstr opened this issue Oct 27, 2015 · 1 comment

Comments

@fstr
Copy link
Contributor

fstr commented Oct 27, 2015

Currently it's possible to add the "parameters" option to the @apidoc annotation.

     * @ApiDoc(
     *      views = { "default"},
     *      authentication=true,
     *      input={
     *          "class" = "\MyEntity",
     *          "groups" = {"put"}
     *      },
     *      parameters={
     *          {"name"="name", "dataType"="integer", "requirement"="foobar", "format"="integer", "description"="this will be the new description"}
     *      },
     * )

Since this setting is at the top most level, it should overwrite previous settings for the given parameter.

Currently this parameters setting has no effect if there are more specific settings in MyEntity.

I would propose to merge the ApiDoc parameters option in the end on top of all other settings.

A use case would be, if you have an internal type (custom JMS Type for example) that you want to shield from the API docs and just show it as a simple array or something in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants