PHP Class ApiPlatform\Core\Swagger\Serializer\DocumentationNormalizer

Author: Amrouche Hamza ([email protected])
Author: Teoh Han Hui ([email protected])
Author: Kévin Dunglas ([email protected])
Inheritance: implements Symfony\Component\Serializer\Normalizer\NormalizerInterface
Show file Open project: api-platform/core

Public Methods

Method Description
__construct ( ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface $resourceMetadataFactory, ApiPlatform\Core\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, ApiPlatform\Core\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Core\Api\OperationMethodResolverInterface $operationMethodResolver, ApiPlatform\Core\PathResolver\OperationPathResolverInterface $operationPathResolver, ApiPlatform\Core\Api\UrlGeneratorInterface $urlGenerator, ApiPlatform\Core\Api\FilterCollection $filterCollection = null, Symfony\Component\Serializer\NameConverter\NameConverterInterface $nameConverter = null )
normalize ( $object, $format = null, array $context = [] )
supportsNormalization ( $data, $format = null )

Private Methods

Method Description
addPaths ( ArrayObject $paths, ArrayObject $definitions, string $resourceClass, string $resourceShortName, ResourceMetadata $resourceMetadata, array $mimeTypes, boolean $collection ) Updates the list of entries in the paths collection.
computeDoc ( Documentation $documentation, ArrayObject $definitions, ArrayObject $paths ) : array Computes the Swagger documentation.
getDefinition ( ArrayObject $definitions, boolean $collection, boolean $parameter, ResourceMetadata $resourceMetadata, string $resourceClass, string $operationName ) : string
getDefinitionSchema ( string $resourceClass, ResourceMetadata $resourceMetadata, array $serializerContext = null ) : ArrayObject Gets a definition Schema Object.
getFiltersParameters ( string $resourceClass, string $operationName, ResourceMetadata $resourceMetadata ) : array Gets Swagger parameters corresponding to enabled filters.
getPath ( string $resourceShortName, array $operation, boolean $collection ) : string Gets the path for an operation.
getPathOperation ( string $operationName, array $operation, string $method, boolean $collection, string $resourceClass, ResourceMetadata $resourceMetadata, array $mimeTypes, ArrayObject $definitions ) : ArrayObject Gets a path Operation Object.
getPropertySchema ( PropertyMetadata $propertyMetadata ) : ArrayObject Gets a property Schema Object.
getType ( string $type, boolean $isCollection, string $className = null, boolean $readableLink = null ) : array Gets the Swagger's type corresponding to the given PHP's type.
updateDeleteOperation ( ArrayObject $pathOperation, string $resourceShortName ) : ArrayObject
updateGetOperation ( ArrayObject $pathOperation, array $mimeTypes, boolean $collection, ResourceMetadata $resourceMetadata, string $resourceClass, string $resourceShortName, string $operationName, ArrayObject $definitions ) : ArrayObject
updatePostOperation ( ArrayObject $pathOperation, array $mimeTypes, boolean $collection, ResourceMetadata $resourceMetadata, string $resourceClass, string $resourceShortName, string $operationName, ArrayObject $definitions ) : ArrayObject
updatePutOperation ( ArrayObject $pathOperation, array $mimeTypes, boolean $collection, ResourceMetadata $resourceMetadata, string $resourceClass, string $resourceShortName, string $operationName, ArrayObject $definitions ) : ArrayObject

Method Details

__construct() public method

public __construct ( ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface $resourceMetadataFactory, ApiPlatform\Core\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, ApiPlatform\Core\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Core\Api\OperationMethodResolverInterface $operationMethodResolver, ApiPlatform\Core\PathResolver\OperationPathResolverInterface $operationPathResolver, ApiPlatform\Core\Api\UrlGeneratorInterface $urlGenerator, ApiPlatform\Core\Api\FilterCollection $filterCollection = null, Symfony\Component\Serializer\NameConverter\NameConverterInterface $nameConverter = null )
$resourceMetadataFactory ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface
$propertyNameCollectionFactory ApiPlatform\Core\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface
$propertyMetadataFactory ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface
$resourceClassResolver ApiPlatform\Core\Api\ResourceClassResolverInterface
$operationMethodResolver ApiPlatform\Core\Api\OperationMethodResolverInterface
$operationPathResolver ApiPlatform\Core\PathResolver\OperationPathResolverInterface
$urlGenerator ApiPlatform\Core\Api\UrlGeneratorInterface
$filterCollection ApiPlatform\Core\Api\FilterCollection
$nameConverter Symfony\Component\Serializer\NameConverter\NameConverterInterface

normalize() public method

public normalize ( $object, $format = null, array $context = [] )
$context array

supportsNormalization() public method

public supportsNormalization ( $data, $format = null )