File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
kotlin-asyncapi-ktor/src/main/kotlin/com/asyncapi/kotlinasyncapi/ktor Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -70,13 +70,17 @@ class AsyncApiModule(
7070 )
7171 }
7272
73- private val asyncApiAnnotationExtension: AsyncApiExtension ? =
73+ private val asyncApiAnnotationExtension: AsyncApiExtension =
7474 object : AsyncApiExtension {
7575 override val order: Int = - 1
76+ private var delegate: AsyncApiExtension ? = null
7677
7778 override fun extend (asyncApi : AsyncApi ): AsyncApi {
7879 val annotated = annotationProvider.asyncApi ? : return asyncApi
79- return AsyncApiExtension .from(order = order, resource = annotated).extend(asyncApi)
80+ val extension = delegate ? : AsyncApiExtension .from(order = order, resource = annotated).also {
81+ delegate = it
82+ }
83+ return extension.extend(asyncApi)
8084 }
8185 }
8286
You can’t perform that action at this time.
0 commit comments