Skip to content

Commit

Permalink
comment about opaque schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
ghik committed Apr 24, 2024
1 parent a56c727 commit 49a12b7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,17 @@ class SchemaComparatorTest extends AnyFunSuite {
}

test("opaque schemas with identical reference to different schemas") {
// `allOf` is currently not understood by SchemaComparator,
// so the schemas are opaque and are compared for pure structural equality
val schema = Schema(allOf = List(ref("Something"), ref("String")))
assert(compare(schema, schema) == List(
GeneralSchemaMismatch(schema, schema)
))
}

test("opaque schemas with different references to identical schemas") {
// `allOf` is currently not understood by SchemaComparator,
// so the schemas are opaque and are compared for pure structural equality
assert(compare(
Schema(allOf = List(ref("Something"), ref("Integer"))),
Schema(allOf = List(ref("String"), ref("Integer")))
Expand Down

0 comments on commit 49a12b7

Please sign in to comment.