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
I need to validate one JSON schema against another to ensure they map onto each other based on their description. I'll be using one schema for output of a process and another for input into another process in my system, which would necessitate a validation check to ensure they align correctly.
Note: I considered the idea of doing it dynamically (i.e. checking against the actual output of the process, instead of the schemas). However, I need to detect a possible mismatch before any processing happens.
What do you think is the correct solution to the problem?
Implementing a Schema Mapping Validation feature between JSON schemas could do it. For instance:
A string schema A maps onto a string schema B if it meets the length and pattern requirements of B.
An object schema A fits onto object schema B if it encompasses at least the same required properties as B.
A null schema A maps onto any schema B if B also includes null as an allowable type.
Will you be able to implement it?
I might be able to implement it, although I am unsure about the complexity within the library's framework. However, I am certainly willing to give it a shot!
The text was updated successfully, but these errors were encountered:
What version of Ajv are you using?
8.11.2
What problem do you want to solve?
I need to validate one JSON schema against another to ensure they map onto each other based on their description. I'll be using one schema for output of a process and another for input into another process in my system, which would necessitate a validation check to ensure they align correctly.
Note: I considered the idea of doing it dynamically (i.e. checking against the actual output of the process, instead of the schemas). However, I need to detect a possible mismatch before any processing happens.
What do you think is the correct solution to the problem?
Implementing a Schema Mapping Validation feature between JSON schemas could do it. For instance:
string
schemaA
maps onto astring
schemaB
if it meets the length and pattern requirements ofB
.object
schemaA
fits ontoobject
schemaB
if it encompasses at least the samerequired
properties asB
.null
schemaA
maps onto any schemaB
ifB
also includesnull
as an allowable type.Will you be able to implement it?
I might be able to implement it, although I am unsure about the complexity within the library's framework. However, I am certainly willing to give it a shot!
The text was updated successfully, but these errors were encountered: