Skip to content

Conversation

@c1tru55
Copy link
Contributor

@c1tru55 c1tru55 commented Nov 25, 2024

Q A
Branch? 4.0
Tickets n/a
License MIT
Doc PR n/a

in case of Collection constraint with empty fields key (this is valid value for it):

    /**
     * @var array<string, mixed>
     */
    #[Assert\Collection(fields: [])]
    public array $options = [];

properties field is generated as plain array, which is incorrect (must be always object):

        options:
          type: object
          properties: [] <--------
          additionalProperties: false

@c1tru55 c1tru55 force-pushed the fix-properties-type-for-property-schema-collection-restriction branch from c855f1c to 627b91f Compare November 25, 2024 20:02
@c1tru55 c1tru55 changed the base branch from main to 4.0 November 28, 2024 08:49
@soyuka soyuka force-pushed the fix-properties-type-for-property-schema-collection-restriction branch from 627b91f to 1365ec9 Compare December 1, 2024 08:40
@soyuka soyuka changed the base branch from 4.0 to 3.4 December 1, 2024 08:40
@soyuka soyuka changed the title fix(symfony): make properties field object-like for property schema collection restriction fix(symfony): object typed property schema collection restriction Dec 6, 2024
@soyuka soyuka merged commit 5111935 into api-platform:3.4 Dec 6, 2024
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.

2 participants