nelmio/NelmioApiDocBundle — pull request #455 by bezhermoso (2014-07-31 19:18:13+00:00)
Title: api:swagger:dump update

I changed the behavior of the `api:swagger:dump` command to be more consistent with most dumping commands.

Currently, the command only supports dumping directly to a file via the required `destination` argument. I realized that it would be more ideal if dumping to a file is optional, and that it should default to just dump the output to the console. This will be helpful for debugging, and will also allow us to pipe the JSON output to other programs.

Here are the changes:

* Removed the `--all` flag. All docs will be dumped if both `--list-only` and `--resource=...` is not provided.
* All calls will default to dump to the console.

To dump to a file:

```
php app/console api:swagger:dump --list-only resources.json
```

will dump the resource list to `resources.json` on the project root.

```
php app/console api:swagger:dump --resource=user /web/swagger-docs/user.json
```

will dump the API declaration for the `/users` resource to `/web/swagger-docs`.

```
php app/console api:swagger:dump web/swagger-docs`
```

will dump the resource list and all API declarations to `web/swagger-docs`.

__This PR is a BC break, though.__