core icon indicating copy to clipboard operation
core copied to clipboard

Upgrade from 2.7.16 to 2.7.18 omits "operation" in JSONLD context

Open jkabat opened this issue 1 year ago • 0 comments

API Platform version(s) affected: 2.7.18

Description
As of now we cant upgrade to v3+. In 2.7.17/18 serialization/normalization had to changed - operations defined in DTO are not provided in JSONLD context anymore and so are impossible to be read in decorator.

#[ApiResource(
    types: ['https://schema.org/PostalAddress'],
    operations: [new Get(controller: 'ApiPlatform\Action\NotFoundAction', read: false, output: false)],
    normalizationContext: ['jsonld_embed_context' => true],
)]

We used JsonLdContextNormalizer to modify output based on "canRead" method of operation object.

Possible Solution
Lock the composer on 2.7.16

jkabat avatar May 10 '24 12:05 jkabat