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
Schema for intersection types are invalid #64
Comments
Andy2003
added a commit
to Andy2003/zod-to-json-schema
that referenced
this issue
May 9, 2023
Andy2003
added a commit
to Andy2003/backstage
that referenced
this issue
May 11, 2023
Using zod intersections results in an invalid JsonSchema. The issue has been reported at zod-to-json-schema project [1]. The following actions has been fixed: - gitlab:group:ensureExists - gitlab:projectAccessToken:create - gitlab:projectDeployToken:create - gitlab:projectVariable:create [1] StefanTerdell/zod-to-json-schema#64 Signed-off-by: Andreas Berger <andreas@berger-ecommerce.com>
Andy2003
added a commit
to Andy2003/backstage
that referenced
this issue
May 11, 2023
Using zod intersections results in an invalid JsonSchema. The issue has been reported at StefanTerdell/zod-to-json-schema#64. The following actions has been fixed: - gitlab:group:ensureExists - gitlab:projectAccessToken:create - gitlab:projectDeployToken:create - gitlab:projectVariable:create resolves backstage#17721 Signed-off-by: Andreas Berger <andreas@berger-ecommerce.com>
5 tasks
Andy2003
added a commit
to Andy2003/backstage
that referenced
this issue
May 11, 2023
Using zod intersections results in an invalid JsonSchema. The issue has been reported at StefanTerdell/zod-to-json-schema#64. The following actions has been fixed: - gitlab:group:ensureExists - gitlab:projectAccessToken:create - gitlab:projectDeployToken:create - gitlab:projectVariable:create resolves backstage#17721 Signed-off-by: Andreas Berger <andreas@berger-ecommerce.com>
StefanTerdell
added a commit
that referenced
this issue
May 11, 2023
…ypes Remove additionalProperties from intersected objects.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given:
the following schema is generated:
The following input:
results in an validation error:
The Problem is, that the
additionalProperties
in bothallOf
-schemas resullts in failing each separate sub-schema validation. This seems to be a common problem in JsonSchema-Validation.The JSON-Schema which is validating everything as expected looks like:
Note the
unevaluatedProperties
and the missingadditionalProperties
.This issue was found in backstage/backstage#17721
The text was updated successfully, but these errors were encountered: