Skip to content

Commit

Permalink
filter duplicate discriminatorclasses
Browse files Browse the repository at this point in the history
  • Loading branch information
jenschude committed Sep 4, 2023
1 parent fd1a8a1 commit 4430388
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ class PhpObjectTypeRenderer constructor(override val vrapTypeProvider: VrapTypeP
| * ${if (this.namedSubTypes().filterIsInstance<ObjectType>().count() > 50) "@psalm-suppress InvalidPropertyAssignmentValue" else ""}
| */
|private static $!discriminatorClasses = [
| <<${this.namedSubTypes().filterIsInstance<ObjectType>().filter{!it.deprecated()}.map { "'${it.discriminatorValue}' => ${it.toVrapType().simpleName()}Model::class," }.sorted().joinToString(separator = "\n")}>>
| <<${this.namedSubTypes().filterIsInstance<ObjectType>().filterNot{ it.deprecated()}.filterNot { it.discriminatorValue.isNullOrEmpty() }.map { "'${it.discriminatorValue}' => ${it.toVrapType().simpleName()}Model::class," }.sorted().joinToString(separator = "\n")}>>
|];
""".trimMargin()
}
Expand Down

0 comments on commit 4430388

Please sign in to comment.