Skip to content

Add an XML / YML example for "Serialization Groups and Relations" #207

@dkarlovi

Description

@dkarlovi

Docs says "The Symfony Serializer component allows to specify the definition of serialization using XML, YAML, or annotations. "

But there's no sample how to setup for example this:

/**
 * @ApiResource(
 *     attributes={"normalization_context"={"groups"={"get"}}},
 *     itemOperations={
 *          "get"={"method"="GET"},
 *          "put"={"method"="PUT", "normalization_context"={"groups"={"put"}}}
 *     }
 * )
 */

in XML or YAML. AFAIK there's also no XML Schema provided (as Symfony does) so it's ever harder to discover the functionality.

It would be great to provide a sample XML / YAML config, even just in a Git repo somewhere. I've looked in core's tests, there isn't one there either.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions