Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.2 missing json-ld context properties #5950

Closed
kstefanini opened this issue Nov 7, 2023 · 3 comments
Closed

3.2 missing json-ld context properties #5950

kstefanini opened this issue Nov 7, 2023 · 3 comments
Labels

Comments

@kstefanini
Copy link

kstefanini commented Nov 7, 2023

API Platform version(s) affected: 3.2.4

Description
After updating from last 3.1 to 3.2.4 some json-ld context are reported missing

How to reproduce
Order has an OneToOne relation to Address available threw #Groups(['order:read'])

#src/Entity/Order.php
    #[Groups(['order:read'])]
    #[ORM\OneToOne(targetEntity: Address::class)]
    private ?Address $address = null;

json-ld context is missing from schema Address.jsonld-order.read but not from Address.jsonld-address.read

Additional Context
Before 3.2
image
After 3.2
image

Thanks in advance for your attention! :)

@pmontoya
Copy link

@vincentchalamon : in #5470, you deprecate the ApiPlatform\JsonSchema\TypeFactory and the sub schema is now generated calling

$subSchema = $this->buildSchema($className, $format, Schema::TYPE_OUTPUT, null, $subSchema, $serializerContext + [self::FORCE_SUBSCHEMA => true], false);

in the ApiPlatform\JsonSchema\SchemaFactory class. As this is not the ApiPlatform\Hydra\JsonSchema\SchemaFactory, the json-ld context is not added.

I'm the sure to understand why you deprecate the ApiPlatform\JsonSchema\TypeFactory so do you have any idea on how to fix this bug ?

Thank you

@vincentchalamon
Copy link
Contributor

vincentchalamon commented Dec 18, 2023

[information] The JsonSchema\TypeFactory has been deprecated in #5897.

@soyuka maybe we forgot to handle a BC layer on this one?

@soyuka
Copy link
Member

soyuka commented Dec 19, 2023

thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants