Tests for aliased collections; Swagger formatting for wrapped collections.

This commit is contained in:
Bez Hermoso 2014-08-12 18:41:23 -07:00
parent c56aceaef5
commit 5fa69a0504
6 changed files with 549 additions and 354 deletions

View File

@ -11,7 +11,6 @@
namespace Nelmio\ApiDocBundle\Formatter; namespace Nelmio\ApiDocBundle\Formatter;
use Nelmio\ApiDocBundle\Annotation\ApiDoc; use Nelmio\ApiDocBundle\Annotation\ApiDoc;
use Nelmio\ApiDocBundle\DataTypes; use Nelmio\ApiDocBundle\DataTypes;
use Nelmio\ApiDocBundle\Swagger\ModelRegistry; use Nelmio\ApiDocBundle\Swagger\ModelRegistry;
@ -276,11 +275,44 @@ class SwaggerFormatter implements FormatterInterface
$message = sprintf('See standard HTTP status code reason for %s', $statusCode); $message = sprintf('See standard HTTP status code reason for %s', $statusCode);
} }
$responseModel = array( if (isset($prop['type']['collection']) && $prop['type']['collection'] === true) {
'code' => $statusCode,
'message' => $message, /*
'responseModel' => $this->registerModel($prop['type']['class'], $prop['model'], ''), * Without alias: Fully\Qualified\Class\Name[]
); * With alias: Fully\Qualified\Class\Name[alias]
*/
$alias = $prop['type']['collectionName'];
$newName = sprintf('%s[%s]', $prop['type']['class'], $alias);
$collId =
$this->registerModel(
$newName,
array(
$alias => array(
'dataType' => null,
'subType' => $prop['type']['class'],
'actualType' => DataTypes::COLLECTION,
'required' => true,
'readonly' => true,
'description' => null,
'default' => null,
'children' => $prop['model'][$alias]['children'],
)
),
''
);
$responseModel = array(
'code' => $statusCode,
'message' => $message,
'responseModel' => $collId
);
} else {
$responseModel = array(
'code' => $statusCode,
'message' => $message,
'responseModel' => $this->registerModel($prop['type']['class'], $prop['model'], ''),
);
}
$responseMessages[$statusCode] = $responseModel; $responseMessages[$statusCode] = $responseModel;
} }
@ -423,7 +455,7 @@ class SwaggerFormatter implements FormatterInterface
$prop['description'] ?: $prop['dataType'] $prop['description'] ?: $prop['dataType']
); );
$items = array( $items = array(
'$ref' => $ref, '$ref' => $ref
); );
} elseif (isset($this->typeMap[$prop['subType']])) { } elseif (isset($this->typeMap[$prop['subType']])) {
$items = array('type' => $this->typeMap[$prop['subType']]); $items = array('type' => $this->typeMap[$prop['subType']]);

View File

@ -130,14 +130,13 @@ class ModelRegistry
case DataTypes::COLLECTION: case DataTypes::COLLECTION:
$type = 'array'; $type = 'array';
if ($prop['subType'] === DataTypes::MODEL) { if ($prop['subType'] === null) {
$items = array(
} else { 'type' => 'string',
);
if ($prop['subType'] === null } elseif (isset($this->typeMap[$prop['subType']])) {
|| isset($this->typeMap[$prop['subType']])) {
$items = array( $items = array(
'type' => 'string', 'type' => $this->typeMap[$prop['subType']]
); );
} elseif (!isset($this->typeMap[$prop['subType']])) { } elseif (!isset($this->typeMap[$prop['subType']])) {
$items = array( $items = array(
@ -149,7 +148,6 @@ class ModelRegistry
) )
); );
} }
}
/* @TODO: Handle recursion if subtype is a model. */ /* @TODO: Handle recursion if subtype is a model. */
break; break;
@ -213,8 +211,9 @@ class ModelRegistry
{ {
/* /*
* Converts \Fully\Qualified\Class\Name to Fully.Qualified.Class.Name * Converts \Fully\Qualified\Class\Name to Fully.Qualified.Class.Name
* "[...]" in aliased and non-aliased collections preserved.
*/ */
$id = preg_replace('#(\\\|[^A-Za-z0-9])#', '.', $className); $id = preg_replace('#(\\\|[^A-Za-z0-9\[\]])#', '.', $className);
//Replace duplicate dots. //Replace duplicate dots.
$id = preg_replace('/\.+/', '.', $id); $id = preg_replace('/\.+/', '.', $id);
//Replace trailing dots. //Replace trailing dots.

View File

@ -19,6 +19,7 @@ class ResourceController
* resource=true, * resource=true,
* resourceDescription="Operations on resource.", * resourceDescription="Operations on resource.",
* description="List resources.", * description="List resources.",
* output="array<Nelmio\ApiDocBundle\Tests\Fixtures\Model\Test> as tests",
* statusCodes={200 = "Returned on success.", 404 = "Returned if resource cannot be found."} * statusCodes={200 = "Returned on success.", 404 = "Returned if resource cannot be found."}
* ) * )
*/ */

View File

@ -156,6 +156,20 @@ _List resources._
- Requirement: json|xml|html - Requirement: json|xml|html
#### Response ####
tests[]:
* type: array of objects (Test)
tests[][a]:
* type: string
tests[][b]:
* type: DateTime
### `POST` /api/resources.{_format} ### ### `POST` /api/resources.{_format} ###

View File

@ -1655,6 +1655,41 @@ With multiple lines.',
'authenticationRoles' => 'authenticationRoles' =>
array(), array(),
'deprecated' => false, 'deprecated' => false,
'response' =>
array (
'tests' =>
array (
'dataType' => 'array of objects (Test)',
'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\Test',
'actualType' => 'collection',
'readonly' => true,
'required' => true,
'default' => true,
'description' => '',
'children' =>
array (
'a' =>
array (
'default' => 'nelmio',
'actualType' => 'string',
'subType' => NULL,
'format' => '{length: min: foo}, {not blank}',
'required' => true,
'dataType' => 'string',
'readonly' => NULL,
),
'b' =>
array (
'default' => NULL,
'actualType' => 'datetime',
'subType' => NULL,
'dataType' => 'DateTime',
'readonly' => NULL,
'required' => NULL,
),
),
),
),
), ),
array( array(
'method' => 'POST', 'method' => 'POST',

View File

@ -121,456 +121,546 @@ class SwaggerFormatterTest extends WebTestCase
return array( return array(
array( array(
'/resources', '/resources',
array( array (
'swaggerVersion' => '1.2', 'swaggerVersion' => '1.2',
'apiVersion' => '3.14', 'apiVersion' => '3.14',
'basePath' => '/api', 'basePath' => '/api',
'resourcePath' => '/resources', 'resourcePath' => '/resources',
'apis' => 'apis' =>
array( array (
0 =>
array( array (
'path' => '/resources.{_format}', 'path' => '/resources.{_format}',
'operations' => 'operations' =>
array( array (
array( 0 =>
'method' => 'GET', array (
'summary' => 'List resources.', 'method' => 'GET',
'nickname' => 'get_resources', 'summary' => 'List resources.',
'parameters' => 'nickname' => 'get_resources',
array( 'parameters' =>
array (
array( 0 =>
'paramType' => 'path', array (
'name' => '_format', 'paramType' => 'path',
'type' => 'string', 'name' => '_format',
'required' => true, 'type' => 'string',
'enum' => 'required' => true,
array( 'enum' =>
'json', array (
'xml', 0 => 'json',
'html', 1 => 'xml',
), 2 => 'html',
), ),
),
),
'responseMessages' =>
array (
0 =>
array (
'code' => 200,
'message' => 'Returned on success.',
'responseModel' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.Test[tests]',
),
1 =>
array (
'code' => 404,
'message' => 'Returned if resource cannot be found.',
),
),
'type' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.Test[tests]',
), ),
'responseMessages' => 1 =>
array( array (
'method' => 'POST',
array( 'summary' => 'Create a new resource.',
'code' => 200, 'nickname' => 'post_resources',
'message' => 'Returned on success.', 'parameters' =>
), array (
0 =>
array( array (
'code' => 404, 'paramType' => 'path',
'message' => 'Returned if resource cannot be found.', 'name' => '_format',
), 'type' => 'string',
'required' => true,
'enum' =>
array (
0 => 'json',
1 => 'xml',
2 => 'html',
),
),
1 =>
array (
'paramType' => 'form',
'name' => 'a',
'type' => 'string',
),
2 =>
array (
'paramType' => 'form',
'name' => 'b',
'type' => 'number',
'format' => 'float',
),
3 =>
array (
'paramType' => 'form',
'name' => 'c',
'type' => 'string',
'enum' =>
array (
0 => 'x',
1 => 'y',
2 => 'z',
),
),
4 =>
array (
'paramType' => 'form',
'name' => 'd',
'type' => 'string',
'format' => 'date-time',
),
5 =>
array (
'paramType' => 'form',
'name' => 'e',
'type' => 'string',
'format' => 'date',
),
6 =>
array (
'paramType' => 'form',
'name' => 'g',
'type' => 'string',
),
),
'responseMessages' =>
array (
0 =>
array (
'code' => 200,
'message' => 'See standard HTTP status code reason for 200',
'responseModel' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsNested',
),
),
'type' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsNested',
), ),
), ),
),
array( 1 =>
'method' => 'POST', array (
'summary' => 'Create a new resource.', 'path' => '/resources/{id}.{_format}',
'nickname' => 'post_resources', 'operations' =>
'parameters' => array (
array( 0 =>
array (
array( 'method' => 'GET',
'paramType' => 'path', 'summary' => 'Retrieve a resource by ID.',
'name' => '_format', 'nickname' => 'get_resources',
'type' => 'string', 'parameters' =>
'required' => true, array (
'enum' => 0 =>
array( array (
'json', 'paramType' => 'path',
'xml', 'name' => 'id',
'html', 'type' => 'string',
), 'required' => true,
), ),
1 =>
array( array (
'paramType' => 'form', 'paramType' => 'path',
'name' => 'a', 'name' => '_format',
'type' => 'string', 'type' => 'string',
), 'required' => true,
'enum' =>
array( array (
'paramType' => 'form', 0 => 'json',
'name' => 'b', 1 => 'xml',
'type' => 'number', 2 => 'html',
'format' => 'float', ),
), ),
),
array( 'responseMessages' =>
'paramType' => 'form', array (
'name' => 'c', ),
'type' => 'string',
'enum' =>
array(
'x',
'y',
'z',
),
),
array(
'paramType' => 'form',
'name' => 'd',
'type' => 'string',
'format' => 'date-time',
),
array(
'paramType' => 'form',
'name' => 'e',
'type' => 'string',
'format' => 'date',
),
array(
'paramType' => 'form',
'name' => 'g',
'type' => 'string',
),
), ),
'responseMessages' => 1 =>
array( array (
array( 'method' => 'DELETE',
'code' => 200, 'summary' => 'Delete a resource by ID.',
'message' => 'See standard HTTP status code reason for 200', 'nickname' => 'delete_resources',
'responseModel' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsNested', 'parameters' =>
), array (
0 =>
array (
'paramType' => 'path',
'name' => 'id',
'type' => 'string',
'required' => true,
),
1 =>
array (
'paramType' => 'path',
'name' => '_format',
'type' => 'string',
'required' => true,
'enum' =>
array (
0 => 'json',
1 => 'xml',
2 => 'html',
),
),
),
'responseMessages' =>
array (
),
), ),
'type' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsNested',
), ),
), ),
),
array(
'path' => '/resources/{id}.{_format}',
'operations' =>
array(
array(
'method' => 'GET',
'summary' => 'Retrieve a resource by ID.',
'nickname' => 'get_resources',
'parameters' =>
array(
array(
'paramType' => 'path',
'name' => 'id',
'type' => 'string',
'required' => true,
),
array(
'paramType' => 'path',
'name' => '_format',
'type' => 'string',
'required' => true,
'enum' =>
array(
'json',
'xml',
'html',
),
),
),
'responseMessages' =>
array(),
),
array(
'method' => 'DELETE',
'summary' => 'Delete a resource by ID.',
'nickname' => 'delete_resources',
'parameters' =>
array(
array(
'paramType' => 'path',
'name' => 'id',
'type' => 'string',
'required' => true,
),
array(
'paramType' => 'path',
'name' => '_format',
'type' => 'string',
'required' => true,
'enum' =>
array(
'json',
'xml',
'html',
),
),
),
'responseMessages' =>
array(),
),
),
),
), ),
'models' => 'models' =>
array( array (
'Nelmio.ApiDocBundle.Tests.Fixtures.Model.Test' =>
array (
'id' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.Test',
'description' => NULL,
'properties' =>
array (
'a' =>
array (
'type' => 'string',
'description' => 'string',
),
'b' =>
array (
'type' => 'string',
'description' => 'DateTime',
'format' => 'date-time',
),
),
'required' =>
array (
0 => 'a',
),
),
'Nelmio.ApiDocBundle.Tests.Fixtures.Model.Test[tests]' =>
array (
'id' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.Test[tests]',
'description' => '',
'properties' =>
array (
'tests' =>
array (
'type' => 'array',
'description' => NULL,
'items' =>
array (
'$ref' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.Test',
),
),
),
'required' =>
array (
0 => 'tests',
),
),
'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsTest' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsTest' =>
array( array (
'id' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsTest', 'id' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsTest',
'description' => 'object (JmsTest)', 'description' => 'object (JmsTest)',
'properties' => 'properties' =>
array( array (
'foo' => 'foo' =>
array( array (
'type' => 'string', 'type' => 'string',
'description' => 'string', 'description' => 'string',
), ),
'bar' => 'bar' =>
array( array (
'type' => 'string', 'type' => 'string',
'description' => 'DateTime', 'description' => 'DateTime',
'format' => 'date-time', 'format' => 'date-time',
), ),
'number' => 'number' =>
array( array (
'type' => 'number', 'type' => 'number',
'description' => 'double', 'description' => 'double',
'format' => 'float', 'format' => 'float',
), ),
'arr' => 'arr' =>
array( array (
'type' => 'array', 'type' => 'array',
'description' => 'array', 'description' => 'array',
'items' => array( 'items' =>
'type' => 'string', array (
) 'type' => 'string',
),
), ),
'nested' => 'nested' =>
array( array (
'$ref' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsNested', '$ref' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsNested',
), ),
'nested_array' => 'nested_array' =>
array( array (
'type' => 'array', 'type' => 'array',
'description' => 'array of objects (JmsNested)', 'description' => 'array of objects (JmsNested)',
'items' => array( 'items' =>
'$ref' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsNested', array (
) '$ref' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsNested',
),
), ),
), ),
'required' => 'required' =>
array(), array (
),
), ),
'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsNested' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsNested' =>
array( array (
'id' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsNested', 'id' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsNested',
'description' => '', 'description' => '',
'properties' => 'properties' =>
array( array (
'foo' => 'foo' =>
array( array (
'type' => 'string', 'type' => 'string',
'description' => 'DateTime', 'description' => 'DateTime',
'format' => 'date-time', 'format' => 'date-time',
), ),
'bar' => 'bar' =>
array( array (
'type' => 'string', 'type' => 'string',
'description' => 'string', 'description' => 'string',
), ),
'baz' => 'baz' =>
array( array (
'type' => 'array', 'type' => 'array',
'description' => 'Epic description. 'description' => 'Epic description.
With multiple lines.', With multiple lines.',
'items' => array( 'items' =>
'type' => 'string', array (
) 'type' => 'integer',
),
), ),
'circular' => 'circular' =>
array( array (
'$ref' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsNested', '$ref' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsNested',
), ),
'parent' => 'parent' =>
array( array (
'$ref' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsTest', '$ref' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsTest',
), ),
'since' => 'since' =>
array( array (
'type' => 'string', 'type' => 'string',
'description' => 'string', 'description' => 'string',
), ),
'until' => 'until' =>
array( array (
'type' => 'string', 'type' => 'string',
'description' => 'string', 'description' => 'string',
), ),
'since_and_until' => 'since_and_until' =>
array( array (
'type' => 'string', 'type' => 'string',
'description' => 'string', 'description' => 'string',
), ),
), ),
'required' => 'required' =>
array(), array (
),
), ),
), ),
'produces' => 'produces' =>
array(), array (
),
'consumes' => 'consumes' =>
array(), array (
),
'authorizations' => 'authorizations' =>
array( array (
'apiKey' => array( 'apiKey' =>
'type' => 'apiKey', array (
'passAs' => 'header', 'type' => 'apiKey',
'keyname' => 'access_token', 'passAs' => 'header',
) 'keyname' => 'access_token',
),
), ),
), ),
), ),
array( array(
'/other-resources', '/other-resources',
array( array (
'swaggerVersion' => '1.2', 'swaggerVersion' => '1.2',
'apiVersion' => '3.14', 'apiVersion' => '3.14',
'basePath' => '/api', 'basePath' => '/api',
'resourcePath' => '/other-resources', 'resourcePath' => '/other-resources',
'apis' => 'apis' =>
array( array (
0 =>
array( array (
'path' => '/other-resources.{_format}', 'path' => '/other-resources.{_format}',
'operations' => 'operations' =>
array( array (
0 =>
array( array (
'method' => 'GET', 'method' => 'GET',
'summary' => 'List another resource.', 'summary' => 'List another resource.',
'nickname' => 'get_other-resources', 'nickname' => 'get_other-resources',
'type' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsTest', 'parameters' =>
'parameters' => array (
array( 0 =>
array (
array( 'paramType' => 'path',
'paramType' => 'path', 'name' => '_format',
'name' => '_format', 'type' => 'string',
'type' => 'string', 'required' => true,
'required' => true, 'enum' =>
'enum' => array (
array( 0 => 'json',
'json', 1 => 'xml',
'xml', 2 => 'html',
'html', ),
), ),
), ),
), 'responseMessages' =>
'responseMessages' => array (
array( 0 =>
array( array (
'code' => 200, 'code' => 200,
'message' => 'See standard HTTP status code reason for 200', 'message' => 'See standard HTTP status code reason for 200',
'responseModel' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsTest', 'responseModel' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsTest[]',
), ),
),
'type' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsTest[]',
), ),
), ),
), ),
), 1 =>
array (
array( 'path' => '/other-resources/{id}.{_format}',
'path' => '/other-resources/{id}.{_format}', 'operations' =>
'operations' => array (
array( 0 =>
array (
array( 'method' => 'PUT',
'method' => 'PUT', 'summary' => 'Update a resource bu ID.',
'summary' => 'Update a resource bu ID.', 'nickname' => 'put_other-resources',
'nickname' => 'put_other-resources', 'parameters' =>
'parameters' => array (
array( 0 =>
array (
array( 'paramType' => 'path',
'paramType' => 'path', 'name' => 'id',
'name' => 'id', 'type' => 'string',
'type' => 'string', 'required' => true,
'required' => true, ),
), 1 =>
array (
array( 'paramType' => 'path',
'paramType' => 'path', 'name' => '_format',
'name' => '_format', 'type' => 'string',
'type' => 'string', 'required' => true,
'required' => true, 'enum' =>
'enum' => array (
array( 0 => 'json',
'json', 1 => 'xml',
'xml', 2 => 'html',
'html', ),
), ),
), ),
'responseMessages' =>
array (
),
), ),
'responseMessages' => 1 =>
array(), array (
), 'method' => 'PATCH',
'summary' => 'Update a resource bu ID.',
array( 'nickname' => 'patch_other-resources',
'method' => 'PATCH', 'parameters' =>
'summary' => 'Update a resource bu ID.', array (
'nickname' => 'patch_other-resources', 0 =>
'parameters' => array (
array( 'paramType' => 'path',
'name' => 'id',
array( 'type' => 'string',
'paramType' => 'path', 'required' => true,
'name' => 'id', ),
'type' => 'string', 1 =>
'required' => true, array (
), 'paramType' => 'path',
'name' => '_format',
array( 'type' => 'string',
'paramType' => 'path', 'required' => true,
'name' => '_format', 'enum' =>
'type' => 'string', array (
'required' => true, 0 => 'json',
'enum' => 1 => 'xml',
array( 2 => 'html',
'json', ),
'xml', ),
'html', ),
), 'responseMessages' =>
), array (
),
), ),
'responseMessages' =>
array(),
), ),
), ),
),
), ),
'models' => 'models' =>
array ( array (
'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsTest' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsTest' =>
array ( array (
'id' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsTest', 'id' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsTest',
'description' => '', 'description' => NULL,
'properties' => 'properties' =>
array ( array (
'' => 'foo' =>
array (
'type' => 'string',
'description' => 'string',
),
'bar' =>
array (
'type' => 'string',
'description' => 'DateTime',
'format' => 'date-time',
),
'number' =>
array (
'type' => 'number',
'description' => 'double',
'format' => 'float',
),
'arr' =>
array ( array (
'type' => 'array', 'type' => 'array',
'description' => 'array of objects (JmsTest)', 'description' => 'array',
'items' => 'items' =>
array ( array (
'$ref' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsTest', 'type' => 'string',
),
),
'nested' =>
array (
'$ref' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsNested',
),
'nested_array' =>
array (
'type' => 'array',
'description' => 'array of objects (JmsNested)',
'items' =>
array (
'$ref' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsNested',
), ),
), ),
), ),
'required' => 'required' =>
array ( array (
0 => '',
), ),
), ),
'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsNested' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsNested' =>
@ -598,7 +688,7 @@ With multiple lines.',
With multiple lines.', With multiple lines.',
'items' => 'items' =>
array ( array (
'type' => 'string', 'type' => 'integer',
), ),
), ),
'circular' => 'circular' =>
@ -629,18 +719,42 @@ With multiple lines.',
array ( array (
), ),
), ),
'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsTest[]' =>
array (
'id' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsTest[]',
'description' => '',
'properties' =>
array (
'' =>
array (
'type' => 'array',
'description' => NULL,
'items' =>
array (
'$ref' => 'Nelmio.ApiDocBundle.Tests.Fixtures.Model.JmsTest',
),
),
),
'required' =>
array (
0 => '',
),
),
), ),
'produces' => 'produces' =>
array(), array (
),
'consumes' => 'consumes' =>
array(), array (
),
'authorizations' => 'authorizations' =>
array( array (
'apiKey' => array( 'apiKey' =>
'type' => 'apiKey', array (
'passAs' => 'header', 'type' => 'apiKey',
'keyname' => 'access_token', 'passAs' => 'header',
) 'keyname' => 'access_token',
),
), ),
), ),
), ),