This is probably occurring because the task runs an isolated compiler with the openAPI compiler plugin enabled, so the kotlinx-serialization plugin is missing and the reference is lost. We're using a different approach in 3.4.0 so it should be resolved there. For a workaround atm, you could try removing references to any generated code from the kotlinx-serialization plugin, so just using
json.encodeToString()
without the
serializer()
call.