From 358169eee3a918715b2ea6b17a3cce4adbdabe75 Mon Sep 17 00:00:00 2001 From: Jeff Lewis Date: Wed, 13 Sep 2023 13:25:08 -0600 Subject: [PATCH] update docs --- .../postprocess/ExternalMemberRefTransformer.scala | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/openapi/src/internals/postprocess/ExternalMemberRefTransformer.scala b/modules/openapi/src/internals/postprocess/ExternalMemberRefTransformer.scala index 79aedb3..608eb40 100644 --- a/modules/openapi/src/internals/postprocess/ExternalMemberRefTransformer.scala +++ b/modules/openapi/src/internals/postprocess/ExternalMemberRefTransformer.scala @@ -22,11 +22,15 @@ import cats.data.Chain import scala.annotation.tailrec /** This transformer is for the specific case where an external reference - * targets the member of a structure from another file. In this case, we need - * to update the target type to be whatever the target type of the referenced - * member is in the target structure. For example, if there is structure A$a - * that references B$b in another file, we would update A$a to instead target - * the same type that B$b targets, rather than targeting B$b directly. + * targets the primitive member of a structure from another file. In this case, + * we need to update the target type to be whatever the target type of the + * referenced member is in the target structure. For example, if there is + * structure A$a that references B$b in another file, we would update A$a to + * instead target the same type that B$b targets, rather than targeting B$b + * directly. Note that this transformation only takes place if B$b targets a + * primitive. If it targets a structure, or another type, then there would be + * no issue. The reason for this is that Structures get rendered as separate + * types already that can be referenced from another file. */ object ExternalMemberRefTransformer extends IModelPostProcessor { private abstract class MatchesOne(val segment: Segment) {