Update swagger-support.md

This commit is contained in:
Bez Hermoso 2014-06-25 14:23:19 -07:00 committed by Bez Hermoso
parent af5cb3dd76
commit ee0496af65
2 changed files with 4 additions and 2 deletions

View File

@ -342,7 +342,9 @@ class SwaggerFormatter implements FormatterInterface
switch ($prop['actualType']) { switch ($prop['actualType']) {
case DataTypes::ENUM: case DataTypes::ENUM:
$type = 'string'; $type = 'string';
if (isset($prop['format'])) {
$enum = array_keys(json_decode($prop['format'], true)); $enum = array_keys(json_decode($prop['format'], true));
}
break; break;
case DataTypes::MODEL: case DataTypes::MODEL:

View File

@ -83,7 +83,7 @@ The routes registered with the method above will read your `@ApiDoc` annotation
php app/console api:swagger:dump --all app/Resources/swagger-docs php app/console api:swagger:dump --all app/Resources/swagger-docs
``` ```
The above command will dump JSON files under the `app/Resources/swagger-docs` directory (relative to your project root), and you can now process or server the files however you want. (If the destination defaults to the project root if not specified.) The above command will dump JSON files under the `app/Resources/swagger-docs` directory (relative to your project root), and you can now process or server the files however you want. The destination defaults to the project root if not specified.
####Selective dumps ####Selective dumps