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
On 4.0.7, importing a draft-07 schema that uses dependencies with a property list fails, after fromSchemaDraft07 rewrites it to dependentRequired:
SchemaRepresentation.fromJsonSchemaDocument(JsonSchema.fromSchemaDraft07({type: "object",properties: {a: {type: "string"},b: {type: "string"}},dependencies: {a: ["b"]}}))// Cannot import JSON Schema keyword "dependentRequired": Effect has no equivalent constraint.
github-workflow.json uses it once.
Context: validating .github/dependabot.yaml and GitHub workflow files with SchemaRepresentation.fromJsonSchemaDocument against the SchemaStore documents dependabot-2.0.json and github-workflow.json, to replace ajv. Since #7410 the importer rejects keywords it cannot represent, which is the right failure, but it means both real-world documents cannot be imported at all. This is one of five gaps found in those two documents; each is filed separately.
What is the feature you are proposing to solve the problem?
Import dependentRequired as a check: when a listed property is present, the properties it names must be too. dependentSchemas could follow the same route as if/then.
What alternatives have you considered?
Stripping the keyword: imports, but no longer requires the dependent properties.
Keeping ajv for these documents: what we do today.
Activity