-
Notifications
You must be signed in to change notification settings - Fork 518
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
CXP-1300: Adds first product meta schema #17982
Conversation
components/catalogs/back/src/Infrastructure/Symfony/Resources/schemas/product-0.0.1.json
Outdated
Show resolved
Hide resolved
components/catalogs/back/src/Infrastructure/Validation/ProductSchemaValidator.php
Show resolved
Hide resolved
components/catalogs/back/src/Infrastructure/Symfony/Resources/schemas/product-0.0.1.json
Outdated
Show resolved
Hide resolved
don't forget to link the API docs PR to fulfill the ticket |
@@ -56,7 +56,7 @@ public function validSchemaDataProvider(): array | |||
{ | |||
return [ | |||
'0.0.1 with valid schema' => [ | |||
'schema' => <<<'JSON' | |||
'schema' => <<<'JSON_WRAP' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain the diff pls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rector complained about it.
https://github.com/rectorphp/rector/blob/main/rules/Php73/Rector/String_/SensitiveHereNowDocRector.php
I'm not sure why this rule exists.
Either we don't care and uses _WRAP
or we disable the rule.
WDYT ?
* CXP-1300: Adds first product meta schema * CXP-1300: remove & from schema * CXP-1300: fix tests
Why a new dependency ?
The current JSON Schema library we use in the PIM stopped updating the spec at the Draft-4. It does not support all the features we have in the meta schema.
jsonrainbow/json-schema#658 🎉
2 new alternatives emerged in the community, and after trying both, I went with
opis/json-schema
because the API is similar and it supportsdraft-2020-12, draft-2019-09, draft-07 and draft-06
.yes, we need an ADR.
Definition Of Done (for Core Developer only)