nelmio/NelmioApiDocBundle — pull request #499 by bezhermoso (2014-08-28 06:59:21+00:00)
Title: Annotation: Specify parameters array directly in `input` option [WIP]

Here is a suggestion for implementing this functionality (recently brought up again here: https://github.com/nelmio/NelmioApiDocBundle/issues/474)

We introduce an `@ApiModel` annotation:

```php
@ApiDoc(
input=@ApiModel({
"name" = {"dataType" = "string", "required" = true},
"age" = {"dataType" = "integer", "required" = false},
"group" = { "dataType" = "integer", "default" = "Users"},
...
})
)
```
Internally we would just normalize the parameters and skip the parsers entirely.

`@ApiModel` can be named, too:

```php
@ApiDoc(
output=@ApiModel("User", {"first_name"={ ... }})
)
```
...mainly for use in `output` if it is needed to support that.