From 1fceeaa9ca6098dbeb2d882be2fca3d818c1b611 Mon Sep 17 00:00:00 2001 From: worstell Date: Tue, 31 Oct 2023 13:11:06 -0700 Subject: [PATCH] fix kotlin schema when ingress annotation is not present (#529) Co-authored-by: Wes --- .../xyz/block/ftl/ksp/SchemaExtractor.kt | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/kotlin-runtime/ftl-runtime/src/main/kotlin/xyz/block/ftl/ksp/SchemaExtractor.kt b/kotlin-runtime/ftl-runtime/src/main/kotlin/xyz/block/ftl/ksp/SchemaExtractor.kt index ea1cebf576..ce68ebe439 100644 --- a/kotlin-runtime/ftl-runtime/src/main/kotlin/xyz/block/ftl/ksp/SchemaExtractor.kt +++ b/kotlin-runtime/ftl-runtime/src/main/kotlin/xyz/block/ftl/ksp/SchemaExtractor.kt @@ -46,20 +46,20 @@ class Visitor(val logger: KSPLogger, val modules: MutableMap method = this.method.toString() ) ) + } - val verb = Verb( - name = function.simpleName.asString(), - request = requestType.toSchemaType().dataRef, - response = responseType.toSchemaType().dataRef, - metadata = metadata, - comments = function.comments(), - ) + val verb = Verb( + name = function.simpleName.asString(), + request = requestType.toSchemaType().dataRef, + response = responseType.toSchemaType().dataRef, + metadata = metadata, + comments = function.comments(), + ) - val requestData = Decl(data_ = requestType.closestClassDeclaration()!!.toSchemaData()) - val responseData = Decl(data_ = responseType.closestClassDeclaration()!!.toSchemaData()) - val decls = mutableSetOf(Decl(verb = verb), requestData, responseData) - modules[moduleName]!!.decls.addAll(decls) - } + val requestData = Decl(data_ = requestType.closestClassDeclaration()!!.toSchemaData()) + val responseData = Decl(data_ = responseType.closestClassDeclaration()!!.toSchemaData()) + val decls = mutableSetOf(Decl(verb = verb), requestData, responseData) + modules[moduleName]!!.decls.addAll(decls) } private fun validateVerb(verb: KSFunctionDeclaration) {