Skip to content

Commit

Permalink
Pushing Tracker to the end
Browse files Browse the repository at this point in the history
  • Loading branch information
blast-hardcheese committed Feb 8, 2022
1 parent a79a629 commit f65e284
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/core/src/main/scala/dev/guardrail/SwaggerUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ object SwaggerUtil {
formattedClsName <- formatTypeName(clsName)
typeName <- pureTypeName(formattedClsName)
widenedTypeName <- widenTypeName(typeName)
parentSimpleRef = comp.downField("allOf", _.getAllOf).map(_.headOption).flatDownField("$ref", _.get$ref).unwrapTracker.map(_.split("/").last)
parentSimpleRef = comp
.downField("allOf", _.getAllOf)
.indexedDistribute
.headOption
.flatMap(_.downField("$ref", _.get$ref).indexedDistribute)
.map(_.unwrapTracker.split("/").last)
parentTerm <- parentSimpleRef.traverse(n => pureTermName(n))
resolvedType = core.Resolved[L](widenedTypeName, parentTerm, None, None, None): core.ResolvedType[L]
} yield (clsName, resolvedType)
Expand Down

0 comments on commit f65e284

Please sign in to comment.