in engine/src/main/kotlin/io/kotless/gen/AzureGenerator.kt [37:58]
fun generate(schema: Schema): Set<TFFile> {
val context = GenerationContext(schema, schema.application)
var newExecuted = true
while (newExecuted) {
newExecuted = false
schema.visit { entity ->
factories[entity::class].orEmpty().forEach { factory ->
@Suppress("UNCHECKED_CAST")
factory as GenerationFactory<Any, Any>
if (!factory.hasRan(entity, context)) {
if (factory.mayRun(entity, context)) {
factory.run(entity, context)
newExecuted = true
}
}
}
}
}
return setOf(TFFile(context.webapp.api.name, ArrayList(context.entities.all())))
}