You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If two fields in an object both reference the same schema component, and the referenced schema contains a nullable field, prism rejects the documents with Type ["string","null"] is not a valid type.
The behavior is also inconsistent between using a schema reference and writing the schema directly.
Ok, verified. This is happening because our resolver is caching the references — trying to re-transform a schema that has been already transformed. We need to clone the schema.
Describe the bug
If two fields in an object both reference the same schema component, and the referenced schema contains a nullable field, prism rejects the documents with
Type ["string","null"] is not a valid type
.The behavior is also inconsistent between using a schema reference and writing the schema directly.
To Reproduce
prism mock schema.yml
✖ fatal Type ["string","null"] is not a valid type
If the sub-schema is used directly instead of using a reference schema, it works fine:
Expected behavior
No error is reported. Using a schema reference works the same as writing the schema directly.
Environment:
The text was updated successfully, but these errors were encountered: