Skip to content

Commit

Permalink
fix kotlin schema when ingress annotation is not present (#529)
Browse files Browse the repository at this point in the history
Co-authored-by: Wes <[email protected]>
  • Loading branch information
worstell and wesbillman authored Oct 31, 2023
1 parent 9846932 commit 1fceeaa
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@ class Visitor(val logger: KSPLogger, val modules: MutableMap<String, ModuleData>
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) {
Expand Down

0 comments on commit 1fceeaa

Please sign in to comment.