Skip to content

Id type error when PUT #139

@baudev

Description

@baudev

I come to report a bug concerning PUT operations on an entity like the Book one. Even if it is not a bug, it should be modified because the behavior is not intuitive. I will try to do a PR in the next few days if I have time.

Currently with the administration interface, when you modify an entity without modifying its identifier (as the following screen), then the request sends as identifier a string and not an integer (/api/books/1 and not 1).

image

The error generated is then, which is normal :

The type of the "id" attribute must be "int", "string" given.

Is this a desired behavior?

Configuration

Name Version
api-platform/admin 0.6.0
api-platform/api-pack 1.1
symfony/console 4.2.*
php 7.1.3

Manual installation (without Docker)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions