fix(metadata): read method and routeName of operations in YAML by Maxcastel · Pull Request #8720 · api-platform/core · GitHub
Skip to content

fix(metadata): read method and routeName of operations in YAML - #8720

Draft
Maxcastel wants to merge 1 commit into
api-platform:5.0from
Maxcastel:fix/yaml-operation-method-route-name
Draft

Maxcastel wants to merge 1 commit into
api-platform:5.0from
Maxcastel:fix/yaml-operation-method-route-name

Conversation

@Maxcastel

Copy link
Copy Markdown
Contributor
Q A
Branch? 5.0
Tickets Related to #6329
License MIT

In YAML, method and routeName on an operation were ignored (they work with attributes and XML, and the docs use both in YAML):

resources:
    App\Entity\Book:
        operations:
            custom_patch:
                class: ApiPlatform\Metadata\HttpOperation
                method: PATCH # ignored, the operation became a GET
                uriTemplate: /books/{id}/custom
            post_publication:
                class: ApiPlatform\Metadata\Post
                routeName: book_post_publication # ignored

The YAML extractor never read these two keys. They were the only operation options read in XML and not in YAML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant