ktor-init-tools
ktor-init-tools copied to clipboard
Relationship problem: Maximum call stack size exceeded
The following problem happens when I want to load this swagger file in start.ktor.io (Version 1.2.2): swagger (1).json.zip
RangeError: Maximum call stack size exceeded
at isInheritanceFromInterface (kotlin.js:1110)
at isInheritanceFromInterface (kotlin.js:1117)
at isInheritanceFromInterface (kotlin.js:1117)
at isInheritanceFromInterface (kotlin.js:1117)
at isInheritanceFromInterface (kotlin.js:1117)
at isInheritanceFromInterface (kotlin.js:1117)
at Object.Kotlin.isType (kotlin.js:1156)
at toList_8 (kotlin.js:15838)
at DynamicAccess.get_keys_mzud1t$ (ktor-generator.js:17168)
at DynamicAccess.get_strKeys_mzud1t$ (ktor-generator.js:17186)
After debugging quite a while it seems to happen when two models have relationships that point to each other. Simplified kotlin form:
data class Model(val otherModel: OtherModel)
data class OtherModel(val model: Model)