From 49a12b7300e78fcc50e3c4940ec6ae2cdcef1b93 Mon Sep 17 00:00:00 2001 From: Roman Janusz Date: Wed, 24 Apr 2024 14:35:34 +0200 Subject: [PATCH] comment about opaque schemas --- .../scala/sttp/apispec/validation/SchemaComparatorTest.scala | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apispec-model/src/test/scala/sttp/apispec/validation/SchemaComparatorTest.scala b/apispec-model/src/test/scala/sttp/apispec/validation/SchemaComparatorTest.scala index bbfddae..912eac0 100644 --- a/apispec-model/src/test/scala/sttp/apispec/validation/SchemaComparatorTest.scala +++ b/apispec-model/src/test/scala/sttp/apispec/validation/SchemaComparatorTest.scala @@ -172,6 +172,8 @@ 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) @@ -179,6 +181,8 @@ class SchemaComparatorTest extends AnyFunSuite { } 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")))