Add Schema.isSubType
for compatibility checking between schemas
#2661
Labels
enhancement
New feature or request
Needs Proposal
This issue needs a plan that clarifies the finer details of how it could be implemented.
schema
What is the problem this feature would solve?
When dealing with schema evolution, it can be very useful to have a way to determine whether schema B is a subtype of schema A in order to understand compatibility relationships between the two schemas.
What is the feature you are proposing to solve the problem?
It would be great if there was an additional function in the
@effect/schema
module along the lines of:Schema.isSubType(schemaA, schemaB): boolean
This might be not possible in all cases of the current Effect Schema system, so for now this probably requires a limitation to exclude support for
Schema.transform
but still would work well for schemas that can be mapped from/to JSONSchema.Related:
What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: