diff --git a/springwolf-add-ons/springwolf-generic-binding/src/main/java/io/github/springwolf/addons/generic_binding/annotation/AsyncGenericOperationBinding.java b/springwolf-add-ons/springwolf-generic-binding/src/main/java/io/github/springwolf/addons/generic_binding/annotation/AsyncGenericOperationBinding.java index 23480ed24..28abc9f0f 100644 --- a/springwolf-add-ons/springwolf-generic-binding/src/main/java/io/github/springwolf/addons/generic_binding/annotation/AsyncGenericOperationBinding.java +++ b/springwolf-add-ons/springwolf-generic-binding/src/main/java/io/github/springwolf/addons/generic_binding/annotation/AsyncGenericOperationBinding.java @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.addons.generic_binding.annotation; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.AsyncOperationBinding; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperationBinding; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/springwolf-add-ons/springwolf-generic-binding/src/main/java/io/github/springwolf/addons/generic_binding/annotation/processor/AsyncGenericOperationBindingProcessor.java b/springwolf-add-ons/springwolf-generic-binding/src/main/java/io/github/springwolf/addons/generic_binding/annotation/processor/AsyncGenericOperationBindingProcessor.java index 59278265c..4aa1cf89a 100644 --- a/springwolf-add-ons/springwolf-generic-binding/src/main/java/io/github/springwolf/addons/generic_binding/annotation/processor/AsyncGenericOperationBindingProcessor.java +++ b/springwolf-add-ons/springwolf-generic-binding/src/main/java/io/github/springwolf/addons/generic_binding/annotation/processor/AsyncGenericOperationBindingProcessor.java @@ -3,8 +3,8 @@ import io.github.springwolf.addons.generic_binding.annotation.AsyncGenericOperationBinding; import io.github.springwolf.asyncapi.v3.bindings.OperationBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.processor.AbstractOperationBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.AbstractOperationBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.ProcessedOperationBinding; import java.util.HashMap; import java.util.Map; diff --git a/springwolf-add-ons/springwolf-generic-binding/src/test/java/io/github/springwolf/addons/generic_binding/annotation/processor/AsyncGenericOperationBindingProcessorTest.java b/springwolf-add-ons/springwolf-generic-binding/src/test/java/io/github/springwolf/addons/generic_binding/annotation/processor/AsyncGenericOperationBindingProcessorTest.java index 67814087a..fd534d9f9 100644 --- a/springwolf-add-ons/springwolf-generic-binding/src/test/java/io/github/springwolf/addons/generic_binding/annotation/processor/AsyncGenericOperationBindingProcessorTest.java +++ b/springwolf-add-ons/springwolf-generic-binding/src/test/java/io/github/springwolf/addons/generic_binding/annotation/processor/AsyncGenericOperationBindingProcessorTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.addons.generic_binding.annotation.processor; import io.github.springwolf.addons.generic_binding.annotation.AsyncGenericOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedOperationBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.ProcessedOperationBinding; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; diff --git a/springwolf-add-ons/springwolf-json-schema/src/test/java/io/github/springwolf/addons/json_schema/JsonSchemaGeneratorTest.java b/springwolf-add-ons/springwolf-json-schema/src/test/java/io/github/springwolf/addons/json_schema/JsonSchemaGeneratorTest.java index 9bea6ee30..408666a23 100644 --- a/springwolf-add-ons/springwolf-json-schema/src/test/java/io/github/springwolf/addons/json_schema/JsonSchemaGeneratorTest.java +++ b/springwolf-add-ons/springwolf-json-schema/src/test/java/io/github/springwolf/addons/json_schema/JsonSchemaGeneratorTest.java @@ -9,7 +9,7 @@ import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.github.springwolf.asyncapi.v3.model.components.ComponentSchema; import io.github.springwolf.asyncapi.v3.model.schema.SchemaObject; -import io.github.springwolf.core.schemas.SwaggerSchemaUtil; +import io.github.springwolf.core.asyncapi.components.SwaggerSchemaUtil; import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.BooleanSchema; diff --git a/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/EmptyChannelBinding.java b/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/EmptyChannelBinding.java new file mode 100644 index 000000000..246f6e38c --- /dev/null +++ b/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/EmptyChannelBinding.java @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +package io.github.springwolf.asyncapi.v3.bindings; + +public class EmptyChannelBinding extends ChannelBinding {} diff --git a/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/EmptyMessageBinding.java b/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/EmptyMessageBinding.java new file mode 100644 index 000000000..923c853de --- /dev/null +++ b/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/EmptyMessageBinding.java @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +package io.github.springwolf.asyncapi.v3.bindings; + +public class EmptyMessageBinding extends MessageBinding {} diff --git a/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/EmptyOperationBinding.java b/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/EmptyOperationBinding.java new file mode 100644 index 000000000..fbc74bd98 --- /dev/null +++ b/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/EmptyOperationBinding.java @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +package io.github.springwolf.asyncapi.v3.bindings; + +public class EmptyOperationBinding extends OperationBinding {} diff --git a/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/jackson/DefaultAsyncApiSerializer.java b/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/jackson/DefaultAsyncApiSerializerService.java similarity index 94% rename from springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/jackson/DefaultAsyncApiSerializer.java rename to springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/jackson/DefaultAsyncApiSerializerService.java index 12b70317a..2243f57c7 100644 --- a/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/jackson/DefaultAsyncApiSerializer.java +++ b/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/jackson/DefaultAsyncApiSerializerService.java @@ -11,13 +11,13 @@ import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator; import io.swagger.v3.core.util.ObjectMapperFactory; -public class DefaultAsyncApiSerializer implements AsyncApiSerializerService { +public class DefaultAsyncApiSerializerService implements AsyncApiSerializerService { private final ObjectMapper jsonMapper = ObjectMapperFactory.createJson31(); private final ObjectMapper yamlMapper = ObjectMapperFactory.createYaml31(); private final PrettyPrinter printer = new CustomPrettyPrinter(); - public DefaultAsyncApiSerializer() { + public DefaultAsyncApiSerializerService() { jsonMapper.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); yamlMapper.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); ((YAMLFactory) yamlMapper.getFactory()).enable(YAMLGenerator.Feature.INDENT_ARRAYS_WITH_INDICATOR); diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/ClasspathUtil.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/ClasspathUtil.java index 1807a345e..59c6cae3e 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/ClasspathUtil.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/ClasspathUtil.java @@ -3,7 +3,7 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import java.io.IOException; import java.io.InputStream; @@ -20,7 +20,7 @@ public static String readAsString(String resourceName) throws IOException { public static JsonNode parseYamlFile(String resourceName) throws IOException { try (InputStream inputStream = ClasspathUtil.class.getResourceAsStream(resourceName)) { - ObjectMapper objectMapper = new DefaultAsyncApiSerializer().getYamlObjectMapper(); + ObjectMapper objectMapper = new DefaultAsyncApiSerializerService().getYamlObjectMapper(); return objectMapper.readTree(inputStream); } } diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/amqp/AMQPBindingTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/amqp/AMQPBindingTest.java index 3757d0ae5..bae8de78e 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/amqp/AMQPBindingTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/amqp/AMQPBindingTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.bindings.amqp; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import io.github.springwolf.asyncapi.v3.model.AsyncAPI; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import io.github.springwolf.asyncapi.v3.model.channel.ChannelReference; @@ -17,7 +17,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class AMQPBindingTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeAMQPChannelBindingQueue() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/googlepubsub/GooglePubSubBindingTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/googlepubsub/GooglePubSubBindingTest.java index c8b850c71..115333539 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/googlepubsub/GooglePubSubBindingTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/googlepubsub/GooglePubSubBindingTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.bindings.googlepubsub; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import io.github.springwolf.asyncapi.v3.model.AsyncAPI; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageObject; @@ -18,7 +18,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class GooglePubSubBindingTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeGooglePubSubMessage() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/jms/JMSBindingTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/jms/JMSBindingTest.java index 36ebc083d..dd5c92019 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/jms/JMSBindingTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/jms/JMSBindingTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.bindings.jms; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import io.github.springwolf.asyncapi.v3.model.AsyncAPI; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageHeaders; @@ -19,7 +19,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class JMSBindingTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeJMSChannel() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaBindingTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaBindingTest.java index 74cf26e20..17d92beba 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaBindingTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaBindingTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.bindings.kafka; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import io.github.springwolf.asyncapi.v3.model.AsyncAPI; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageObject; @@ -19,7 +19,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class KafkaBindingTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeKafkaServerBinding() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/mqtt/MQTTBindingTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/mqtt/MQTTBindingTest.java index 687cb762c..a1751aa87 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/mqtt/MQTTBindingTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/mqtt/MQTTBindingTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.bindings.mqtt; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import io.github.springwolf.asyncapi.v3.model.AsyncAPI; import io.github.springwolf.asyncapi.v3.model.schema.SchemaObject; import io.github.springwolf.asyncapi.v3.model.server.Server; @@ -15,7 +15,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class MQTTBindingTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeMQTTServerExample1() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/pulsar/PulsarBindingTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/pulsar/PulsarBindingTest.java index 55b517ecb..c3adcb7e5 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/pulsar/PulsarBindingTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/pulsar/PulsarBindingTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.bindings.pulsar; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import io.github.springwolf.asyncapi.v3.model.AsyncAPI; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import io.github.springwolf.asyncapi.v3.model.server.Server; @@ -15,7 +15,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class PulsarBindingTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializePulsarServer() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/sns/SNSBindingTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/sns/SNSBindingTest.java index dae2028e4..c486d86a6 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/sns/SNSBindingTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/sns/SNSBindingTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.bindings.sns; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import io.github.springwolf.asyncapi.v3.model.AsyncAPI; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import org.junit.jupiter.api.Disabled; @@ -15,7 +15,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class SNSBindingTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeSNSChannel() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/sqs/SQSBindingTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/sqs/SQSBindingTest.java index a28ddf3c5..c11c79da9 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/sqs/SQSBindingTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/sqs/SQSBindingTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.bindings.sqs; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import io.github.springwolf.asyncapi.v3.model.AsyncAPI; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import org.junit.jupiter.api.Disabled; @@ -14,7 +14,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class SQSBindingTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test @Disabled("Binding example is not updated to AsyncAPI v3") diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/DefaultAsyncApiSerializerServiceIntegrationTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/jackson/DefaultAsyncApiSerializerServiceIntegrationTest.java similarity index 88% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/DefaultAsyncApiSerializerServiceIntegrationTest.java rename to springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/jackson/DefaultAsyncApiSerializerServiceIntegrationTest.java index e179ed0a3..28a0e1357 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/DefaultAsyncApiSerializerServiceIntegrationTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/jackson/DefaultAsyncApiSerializerServiceIntegrationTest.java @@ -1,11 +1,10 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi; +package io.github.springwolf.asyncapi.v3.jackson; +import io.github.springwolf.asyncapi.v3.ClasspathUtil; import io.github.springwolf.asyncapi.v3.bindings.OperationBinding; import io.github.springwolf.asyncapi.v3.bindings.kafka.KafkaMessageBinding; import io.github.springwolf.asyncapi.v3.bindings.kafka.KafkaOperationBinding; -import io.github.springwolf.asyncapi.v3.jackson.AsyncApiSerializerService; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; import io.github.springwolf.asyncapi.v3.model.AsyncAPI; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import io.github.springwolf.asyncapi.v3.model.channel.ChannelReference; @@ -24,12 +23,7 @@ import io.github.springwolf.asyncapi.v3.model.schema.SchemaObject; import io.github.springwolf.asyncapi.v3.model.schema.SchemaType; import io.github.springwolf.asyncapi.v3.model.server.Server; -import io.github.springwolf.core.ClasspathUtil; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit.jupiter.SpringExtension; import java.io.IOException; import java.io.InputStream; @@ -39,12 +33,9 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; -@ExtendWith(SpringExtension.class) -@ContextConfiguration(classes = {DefaultAsyncApiSerializer.class}) class DefaultAsyncApiSerializerServiceIntegrationTest { - @Autowired - private AsyncApiSerializerService serializer; + private static final AsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); private AsyncAPI getAsyncAPITestObject() { Info info = Info.builder() @@ -132,7 +123,7 @@ private AsyncAPI getAsyncAPITestObject() { void AsyncAPI_should_map_to_a_valid_asyncapi_json() throws IOException { var asyncapi = getAsyncAPITestObject(); String actual = serializer.toJsonString(asyncapi); - InputStream s = this.getClass().getResourceAsStream("/asyncapi/asyncapi.json"); + InputStream s = this.getClass().getResourceAsStream("/v3/asyncapi/asyncapi.json"); String expected = new String(s.readAllBytes(), StandardCharsets.UTF_8); assertThatJson(actual).isEqualTo(expected); } @@ -141,7 +132,7 @@ void AsyncAPI_should_map_to_a_valid_asyncapi_json() throws IOException { void AsyncAPI_should_map_to_a_valid_asyncapi_yaml() throws IOException { var asyncapi = getAsyncAPITestObject(); String actual = serializer.toJsonString(asyncapi); - var expected = ClasspathUtil.parseYamlFile("/asyncapi/asyncapi.yaml"); + var expected = ClasspathUtil.parseYamlFile("/v3/asyncapi/asyncapi.yaml"); assertThatJson(actual).isEqualTo(expected); } } diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/AsyncAPITest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/AsyncAPITest.java index bdeca849f..1c8a188bb 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/AsyncAPITest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/AsyncAPITest.java @@ -3,7 +3,7 @@ import io.github.springwolf.asyncapi.v3.ClasspathUtil; import io.github.springwolf.asyncapi.v3.bindings.kafka.KafkaOperationBinding; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import io.github.springwolf.asyncapi.v3.model.channel.ChannelParameter; import io.github.springwolf.asyncapi.v3.model.channel.ChannelReference; @@ -33,7 +33,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class AsyncAPITest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldCreateSimpleAsyncAPI() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/channel/ChannelObjectTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/channel/ChannelObjectTest.java index 3b89df6c0..4672a6fab 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/channel/ChannelObjectTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/channel/ChannelObjectTest.java @@ -5,7 +5,7 @@ import io.github.springwolf.asyncapi.v3.bindings.amqp.AMQPChannelBinding; import io.github.springwolf.asyncapi.v3.bindings.amqp.AMQPChannelQueueProperties; import io.github.springwolf.asyncapi.v3.bindings.amqp.AMQPChannelType; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import io.github.springwolf.asyncapi.v3.model.ExternalDocumentation; import io.github.springwolf.asyncapi.v3.model.Tag; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; @@ -18,7 +18,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class ChannelObjectTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeChannelObject() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/channel/ChannelParameterTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/channel/ChannelParameterTest.java index 03df27fb0..7ff7d3142 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/channel/ChannelParameterTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/channel/ChannelParameterTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.model.channel; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import org.junit.jupiter.api.Test; import java.io.IOException; @@ -11,7 +11,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class ChannelParameterTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeChannelParameter() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/channel/CorrelationIDTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/channel/CorrelationIDTest.java index fd40841c4..d74397ec4 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/channel/CorrelationIDTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/channel/CorrelationIDTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.model.channel; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import org.junit.jupiter.api.Test; import java.io.IOException; @@ -10,7 +10,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class CorrelationIDTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeCorrelationID() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/channel/MessageTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/channel/MessageTest.java index 921563435..1d990ef1f 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/channel/MessageTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/channel/MessageTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.model.channel; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import io.github.springwolf.asyncapi.v3.model.Tag; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageExample; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageHeaders; @@ -20,7 +20,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class MessageTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeMessage() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/info/ContactTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/info/ContactTest.java index e266db651..f93b344e8 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/info/ContactTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/info/ContactTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.model.info; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import org.junit.jupiter.api.Test; import java.io.IOException; @@ -10,7 +10,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class ContactTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeContact() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/info/InfoTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/info/InfoTest.java index f870fcef6..5685b270b 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/info/InfoTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/info/InfoTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.model.info; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import io.github.springwolf.asyncapi.v3.model.ExternalDocumentation; import io.github.springwolf.asyncapi.v3.model.Tag; import org.junit.jupiter.api.Test; @@ -13,7 +13,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class InfoTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeInfo() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/info/LicenseTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/info/LicenseTest.java index d4beb37d7..c557f1c37 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/info/LicenseTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/info/LicenseTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.model.info; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import org.junit.jupiter.api.Test; import java.io.IOException; @@ -10,7 +10,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class LicenseTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeLicense() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/operation/OperationReplyAddressTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/operation/OperationReplyAddressTest.java index 195f9affd..bb6731263 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/operation/OperationReplyAddressTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/operation/OperationReplyAddressTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.model.operation; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import org.junit.jupiter.api.Test; import java.io.IOException; @@ -10,7 +10,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class OperationReplyAddressTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeOperationReplyAddress() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/operation/OperationTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/operation/OperationTest.java index 7a5d36d40..32024532d 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/operation/OperationTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/operation/OperationTest.java @@ -3,7 +3,7 @@ import io.github.springwolf.asyncapi.v3.ClasspathUtil; import io.github.springwolf.asyncapi.v3.bindings.amqp.AMQPOperationBinding; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import io.github.springwolf.asyncapi.v3.model.Tag; import io.github.springwolf.asyncapi.v3.model.channel.ChannelReference; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; @@ -17,7 +17,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class OperationTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeOperation() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/schema/SchemaTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/schema/SchemaTest.java index c1e492f32..11823cb52 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/schema/SchemaTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/schema/SchemaTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.model.schema; import com.fasterxml.jackson.core.JsonProcessingException; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.github.springwolf.asyncapi.v3.model.components.ComponentSchema; import org.junit.jupiter.api.Test; @@ -14,7 +14,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class SchemaTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializePrimitiveSample() throws JsonProcessingException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/security_scheme/SecuritySchemeTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/security_scheme/SecuritySchemeTest.java index 30f53bab3..c597b1b78 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/security_scheme/SecuritySchemeTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/security_scheme/SecuritySchemeTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.model.security_scheme; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import io.github.springwolf.asyncapi.v3.model.security_scheme.oauth2.OAuthFlows; import io.github.springwolf.asyncapi.v3.model.security_scheme.oauth2.flows.ImplicitOAuthFlow; import org.junit.jupiter.api.Test; @@ -14,7 +14,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class SecuritySchemeTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeUserPassword() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/security_scheme/oauth2/flows/OAuthFlowTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/security_scheme/oauth2/flows/OAuthFlowTest.java index 521b83ffa..1bcbe0411 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/security_scheme/oauth2/flows/OAuthFlowTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/security_scheme/oauth2/flows/OAuthFlowTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.model.security_scheme.oauth2.flows; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import org.junit.jupiter.api.Test; import java.io.IOException; @@ -11,7 +11,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class OAuthFlowTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeAuthorizationCodeOAuthFlow() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/server/ServerTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/server/ServerTest.java index 6a8e73fbc..6af62fd25 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/server/ServerTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/server/ServerTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.model.server; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import io.github.springwolf.asyncapi.v3.model.Tag; import org.junit.jupiter.api.Test; @@ -12,7 +12,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class ServerTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeServer() throws IOException { diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/server/ServerVariableTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/server/ServerVariableTest.java index 2fb65a013..c3f95e596 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/server/ServerVariableTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/model/server/ServerVariableTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.asyncapi.v3.model.server; import io.github.springwolf.asyncapi.v3.ClasspathUtil; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import org.junit.jupiter.api.Test; import java.io.IOException; @@ -12,7 +12,7 @@ import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; class ServerVariableTest { - private static final DefaultAsyncApiSerializer serializer = new DefaultAsyncApiSerializer(); + private static final DefaultAsyncApiSerializerService serializer = new DefaultAsyncApiSerializerService(); @Test void shouldSerializeServerVariable() throws IOException { diff --git a/springwolf-core/src/test/resources/asyncapi/asyncapi.json b/springwolf-asyncapi/src/test/resources/v3/asyncapi/asyncapi.json similarity index 100% rename from springwolf-core/src/test/resources/asyncapi/asyncapi.json rename to springwolf-asyncapi/src/test/resources/v3/asyncapi/asyncapi.json diff --git a/springwolf-core/src/test/resources/asyncapi/asyncapi.yaml b/springwolf-asyncapi/src/test/resources/v3/asyncapi/asyncapi.yaml similarity index 100% rename from springwolf-core/src/test/resources/asyncapi/asyncapi.yaml rename to springwolf-asyncapi/src/test/resources/v3/asyncapi/asyncapi.yaml diff --git a/springwolf-core/build.gradle b/springwolf-core/build.gradle index db73ce679..73908080f 100644 --- a/springwolf-core/build.gradle +++ b/springwolf-core/build.gradle @@ -46,7 +46,6 @@ dependencies { testImplementation "org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}" testImplementation "org.junit.jupiter:junit-jupiter-params:${junitJupiterVersion}" testImplementation "org.assertj:assertj-core:${assertjCoreVersion}" - testImplementation "net.javacrumbs.json-unit:json-unit-assertj:${jsonUnitAssertJVersion}" testImplementation "org.awaitility:awaitility:${awaitilityVersion}" testImplementation "org.mockito:mockito-core:${mockitoCoreVersion}" testImplementation "org.mockito:mockito-junit-jupiter:${mockitoJunitJupiterVersion}" diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/SpringwolfInitApplicationListener.java b/springwolf-core/src/main/java/io/github/springwolf/core/SpringwolfInitApplicationListener.java similarity index 93% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/SpringwolfInitApplicationListener.java rename to springwolf-core/src/main/java/io/github/springwolf/core/SpringwolfInitApplicationListener.java index a7779b657..952bf8f71 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/SpringwolfInitApplicationListener.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/SpringwolfInitApplicationListener.java @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi; +package io.github.springwolf.core; +import io.github.springwolf.core.asyncapi.AsyncApiService; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties.InitMode; import lombok.RequiredArgsConstructor; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/DefaultAsyncApiService.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/DefaultAsyncApiService.java index 8fbfd8423..12af68eab 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/DefaultAsyncApiService.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/DefaultAsyncApiService.java @@ -5,9 +5,11 @@ import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import io.github.springwolf.asyncapi.v3.model.components.Components; import io.github.springwolf.asyncapi.v3.model.operation.Operation; -import io.github.springwolf.core.configuration.AsyncApiDocket; -import io.github.springwolf.core.configuration.AsyncApiDocketService; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.channels.ChannelsService; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.operations.OperationsService; +import io.github.springwolf.core.configuration.docket.AsyncApiDocket; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/payload/AsyncApiPayload.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncApiPayload.java similarity index 73% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/payload/AsyncApiPayload.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncApiPayload.java index dddfe323a..b6a062a81 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/payload/AsyncApiPayload.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncApiPayload.java @@ -1,9 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.payload; - -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncPublisher; +package io.github.springwolf.core.asyncapi.annotations; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/operationdata/annotation/AsyncListener.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncListener.java similarity index 95% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/operationdata/annotation/AsyncListener.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncListener.java index 28dc40cfd..2a08d5751 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/operationdata/annotation/AsyncListener.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncListener.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation; +package io.github.springwolf.core.asyncapi.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/operationdata/annotation/AsyncListeners.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncListeners.java similarity index 82% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/operationdata/annotation/AsyncListeners.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncListeners.java index 4ce94f891..ff9463b6b 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/operationdata/annotation/AsyncListeners.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncListeners.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation; +package io.github.springwolf.core.asyncapi.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/operationdata/annotation/AsyncMessage.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncMessage.java similarity index 92% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/operationdata/annotation/AsyncMessage.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncMessage.java index 9a523465d..7f3f5d0d2 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/operationdata/annotation/AsyncMessage.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncMessage.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation; +package io.github.springwolf.core.asyncapi.annotations; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageObject; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/operationdata/annotation/AsyncOperation.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncOperation.java similarity index 93% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/operationdata/annotation/AsyncOperation.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncOperation.java index 24e6ba626..a52dcab6e 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/operationdata/annotation/AsyncOperation.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncOperation.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation; +package io.github.springwolf.core.asyncapi.annotations; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncOperationBinding.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncOperationBinding.java similarity index 83% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncOperationBinding.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncOperationBinding.java index 2d8c4939b..867a06bc6 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncOperationBinding.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncOperationBinding.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; @@ -13,8 +13,6 @@ * The annotations annotated with {@code @AsyncOperationBinding} are intended to provide the Operation Bindings * Object documentation. Those implementations are usually available in its own plugin, like {@code springwolf-kafka-plugin} * or {@code springwolf-amqp-plugin} - * - * Maintainer note: Move to io.github.springwolf.core.asyncapi.scanners.bindings */ @Retention(RetentionPolicy.RUNTIME) @Target(value = {ElementType.ANNOTATION_TYPE}) diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/operationdata/annotation/AsyncPublisher.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncPublisher.java similarity index 94% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/operationdata/annotation/AsyncPublisher.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncPublisher.java index ba80853dc..14a697452 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/operationdata/annotation/AsyncPublisher.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncPublisher.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation; +package io.github.springwolf.core.asyncapi.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/operationdata/annotation/AsyncPublishers.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncPublishers.java similarity index 82% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/operationdata/annotation/AsyncPublishers.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncPublishers.java index e76bc7c29..ba90253a7 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/operationdata/annotation/AsyncPublishers.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/annotations/AsyncPublishers.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation; +package io.github.springwolf.core.asyncapi.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/ChannelsService.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/channels/ChannelsService.java similarity index 89% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/ChannelsService.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/channels/ChannelsService.java index df18a2d2e..fc57700d7 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/ChannelsService.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/channels/ChannelsService.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi; +package io.github.springwolf.core.asyncapi.channels; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/DefaultChannelsService.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/channels/DefaultChannelsService.java similarity index 91% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/DefaultChannelsService.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/channels/DefaultChannelsService.java index ce5654c3e..bf7daee7f 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/DefaultChannelsService.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/channels/DefaultChannelsService.java @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi; +package io.github.springwolf.core.asyncapi.channels; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; +import io.github.springwolf.core.asyncapi.scanners.ChannelsScanner; import io.github.springwolf.core.asyncapi.scanners.channels.ChannelMerger; -import io.github.springwolf.core.asyncapi.scanners.channels.ChannelsScanner; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/ComponentsService.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/ComponentsService.java similarity index 83% rename from springwolf-core/src/main/java/io/github/springwolf/core/schemas/ComponentsService.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/ComponentsService.java index 9e60bbf12..dbe0341e7 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/ComponentsService.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/ComponentsService.java @@ -1,11 +1,11 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas; +package io.github.springwolf.core.asyncapi.components; import io.github.springwolf.asyncapi.v3.model.channel.message.Message; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageObject; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.github.springwolf.asyncapi.v3.model.schema.SchemaObject; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaders; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaders; import java.util.Map; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/DefaultComponentsService.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/DefaultComponentsService.java similarity index 95% rename from springwolf-core/src/main/java/io/github/springwolf/core/schemas/DefaultComponentsService.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/DefaultComponentsService.java index 528738b7d..994fff25d 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/DefaultComponentsService.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/DefaultComponentsService.java @@ -1,14 +1,14 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas; +package io.github.springwolf.core.asyncapi.components; import io.github.springwolf.asyncapi.v3.model.channel.message.Message; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageObject; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.github.springwolf.asyncapi.v3.model.schema.SchemaObject; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.AsyncApiPayload; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaders; +import io.github.springwolf.core.asyncapi.annotations.AsyncApiPayload; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaders; +import io.github.springwolf.core.asyncapi.components.postprocessors.SchemasPostProcessor; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; -import io.github.springwolf.core.schemas.postprocessor.SchemasPostProcessor; import io.swagger.v3.core.converter.ModelConverter; import io.swagger.v3.core.converter.ModelConverters; import io.swagger.v3.core.jackson.TypeNameResolver; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/SwaggerSchemaUtil.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/SwaggerSchemaUtil.java similarity index 98% rename from springwolf-core/src/main/java/io/github/springwolf/core/schemas/SwaggerSchemaUtil.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/SwaggerSchemaUtil.java index f23665ad9..a8a0e6151 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/SwaggerSchemaUtil.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/SwaggerSchemaUtil.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas; +package io.github.springwolf.core.asyncapi.components; import io.github.springwolf.asyncapi.v3.model.ExternalDocumentation; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/SchemaWalkerProvider.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/SchemaWalkerProvider.java similarity index 78% rename from springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/SchemaWalkerProvider.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/SchemaWalkerProvider.java index b7e377a28..2aec306d1 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/SchemaWalkerProvider.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/SchemaWalkerProvider.java @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.example; +package io.github.springwolf.core.asyncapi.components.examples; +import io.github.springwolf.core.asyncapi.components.examples.walkers.SchemaWalker; import lombok.RequiredArgsConstructor; import java.util.List; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/DefaultSchemaWalker.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/DefaultSchemaWalker.java similarity index 99% rename from springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/DefaultSchemaWalker.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/DefaultSchemaWalker.java index 7b9181eb2..17cd8d8d7 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/DefaultSchemaWalker.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/DefaultSchemaWalker.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.example; +package io.github.springwolf.core.asyncapi.components.examples.walkers; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.swagger.v3.oas.models.media.Schema; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/ExampleValueGenerator.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/ExampleValueGenerator.java similarity index 95% rename from springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/ExampleValueGenerator.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/ExampleValueGenerator.java index 8942e422d..a8d6e5496 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/ExampleValueGenerator.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/ExampleValueGenerator.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.example; +package io.github.springwolf.core.asyncapi.components.examples.walkers; import io.swagger.v3.oas.models.media.Schema; @@ -11,7 +11,7 @@ * @param The internal representation of a node like object to compose the example * @param The serializable representation of the example */ -interface ExampleValueGenerator { +public interface ExampleValueGenerator { Boolean DEFAULT_BOOLEAN_EXAMPLE = true; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/PropertyExample.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/PropertyExample.java new file mode 100644 index 000000000..0f314edbc --- /dev/null +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/PropertyExample.java @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +package io.github.springwolf.core.asyncapi.components.examples.walkers; + +public record PropertyExample(String name, T example) {} diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/SchemaWalker.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/SchemaWalker.java similarity index 92% rename from springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/SchemaWalker.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/SchemaWalker.java index 1162c0195..bd0c634a6 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/SchemaWalker.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/SchemaWalker.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.example; +package io.github.springwolf.core.asyncapi.components.examples.walkers; import io.swagger.v3.oas.models.media.Schema; import jakarta.annotation.Nullable; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/ExampleJsonValueGenerator.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/json/ExampleJsonValueGenerator.java similarity index 95% rename from springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/ExampleJsonValueGenerator.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/json/ExampleJsonValueGenerator.java index 7fbc48c6e..2b9d06841 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/ExampleJsonValueGenerator.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/json/ExampleJsonValueGenerator.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.example; +package io.github.springwolf.core.asyncapi.components.examples.walkers.json; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; @@ -10,6 +10,8 @@ import com.fasterxml.jackson.databind.node.IntNode; import com.fasterxml.jackson.databind.node.JsonNodeFactory; import com.fasterxml.jackson.databind.node.ObjectNode; +import io.github.springwolf.core.asyncapi.components.examples.walkers.ExampleValueGenerator; +import io.github.springwolf.core.asyncapi.components.examples.walkers.PropertyExample; import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.models.media.Schema; import jakarta.validation.constraints.NotNull; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/DefaultExampleXmlValueSerializer.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/xml/DefaultExampleXmlValueSerializer.java similarity index 93% rename from springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/DefaultExampleXmlValueSerializer.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/xml/DefaultExampleXmlValueSerializer.java index 788c316b8..38726270a 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/DefaultExampleXmlValueSerializer.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/xml/DefaultExampleXmlValueSerializer.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.example; +package io.github.springwolf.core.asyncapi.components.examples.walkers.xml; import org.w3c.dom.Document; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/ExampleXmlValueGenerator.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/xml/ExampleXmlValueGenerator.java similarity index 96% rename from springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/ExampleXmlValueGenerator.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/xml/ExampleXmlValueGenerator.java index 7abb7350e..905943f66 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/ExampleXmlValueGenerator.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/xml/ExampleXmlValueGenerator.java @@ -1,6 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.example; +package io.github.springwolf.core.asyncapi.components.examples.walkers.xml; +import io.github.springwolf.core.asyncapi.components.examples.walkers.ExampleValueGenerator; +import io.github.springwolf.core.asyncapi.components.examples.walkers.PropertyExample; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; import lombok.extern.slf4j.Slf4j; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/ExampleXmlValueSerializer.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/xml/ExampleXmlValueSerializer.java similarity index 76% rename from springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/ExampleXmlValueSerializer.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/xml/ExampleXmlValueSerializer.java index af23692a9..abc0f339c 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/ExampleXmlValueSerializer.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/xml/ExampleXmlValueSerializer.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.example; +package io.github.springwolf.core.asyncapi.components.examples.walkers.xml; import org.w3c.dom.Document; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/DefaultExampleYamlValueSerializer.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/yaml/DefaultExampleYamlValueSerializer.java similarity index 87% rename from springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/DefaultExampleYamlValueSerializer.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/yaml/DefaultExampleYamlValueSerializer.java index 649243f00..36b0f25c3 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/DefaultExampleYamlValueSerializer.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/yaml/DefaultExampleYamlValueSerializer.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.example; +package io.github.springwolf.core.asyncapi.components.examples.walkers.yaml; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/ExampleYamlValueGenerator.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/yaml/ExampleYamlValueGenerator.java similarity index 93% rename from springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/ExampleYamlValueGenerator.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/yaml/ExampleYamlValueGenerator.java index 96d51039d..124842269 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/ExampleYamlValueGenerator.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/yaml/ExampleYamlValueGenerator.java @@ -1,8 +1,11 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.example; +package io.github.springwolf.core.asyncapi.components.examples.walkers.yaml; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; +import io.github.springwolf.core.asyncapi.components.examples.walkers.ExampleValueGenerator; +import io.github.springwolf.core.asyncapi.components.examples.walkers.PropertyExample; +import io.github.springwolf.core.asyncapi.components.examples.walkers.json.ExampleJsonValueGenerator; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; import lombok.RequiredArgsConstructor; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/ExampleYamlValueSerializer.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/yaml/ExampleYamlValueSerializer.java similarity index 78% rename from springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/ExampleYamlValueSerializer.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/yaml/ExampleYamlValueSerializer.java index c0359db8f..ee2b0475e 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/ExampleYamlValueSerializer.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/yaml/ExampleYamlValueSerializer.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.example; +package io.github.springwolf.core.asyncapi.components.examples.walkers.yaml; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/message/header/AsyncHeaderSchema.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/headers/AsyncHeaderSchema.java similarity index 91% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/message/header/AsyncHeaderSchema.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/headers/AsyncHeaderSchema.java index 007284016..9ed56855f 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/message/header/AsyncHeaderSchema.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/headers/AsyncHeaderSchema.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.types.channel.operation.message.header; +package io.github.springwolf.core.asyncapi.components.headers; import com.fasterxml.jackson.annotation.JsonIgnore; import io.swagger.v3.oas.models.media.StringSchema; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/message/header/AsyncHeaders.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/headers/AsyncHeaders.java similarity index 92% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/message/header/AsyncHeaders.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/headers/AsyncHeaders.java index 2c38e87e4..63f408f9f 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/message/header/AsyncHeaders.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/headers/AsyncHeaders.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.types.channel.operation.message.header; +package io.github.springwolf.core.asyncapi.components.headers; import io.swagger.v3.oas.models.media.Schema; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/message/header/AsyncHeadersBuilder.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/headers/AsyncHeadersBuilder.java similarity index 61% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/message/header/AsyncHeadersBuilder.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/headers/AsyncHeadersBuilder.java index 85953bdf0..4cf06eb83 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/message/header/AsyncHeadersBuilder.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/headers/AsyncHeadersBuilder.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.types.channel.operation.message.header; +package io.github.springwolf.core.asyncapi.components.headers; public interface AsyncHeadersBuilder { AsyncHeaders buildHeaders(Class payloadType); diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/message/header/AsyncHeadersCloudEventConstants.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/headers/AsyncHeadersCloudEventConstants.java similarity index 92% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/message/header/AsyncHeadersCloudEventConstants.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/headers/AsyncHeadersCloudEventConstants.java index 476afde04..56a026a9f 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/message/header/AsyncHeadersCloudEventConstants.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/headers/AsyncHeadersCloudEventConstants.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.types.channel.operation.message.header; +package io.github.springwolf.core.asyncapi.components.headers; public class AsyncHeadersCloudEventConstants { public static final String CONTENT_TYPE = "content-type"; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/message/header/AsyncHeadersNotDocumented.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/headers/AsyncHeadersNotDocumented.java similarity index 85% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/message/header/AsyncHeadersNotDocumented.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/headers/AsyncHeadersNotDocumented.java index 36c2ad667..2389730b4 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/message/header/AsyncHeadersNotDocumented.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/headers/AsyncHeadersNotDocumented.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.types.channel.operation.message.header; +package io.github.springwolf.core.asyncapi.components.headers; public class AsyncHeadersNotDocumented implements AsyncHeadersBuilder { /** diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/postprocessor/AvroSchemaPostProcessor.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/postprocessors/AvroSchemaPostProcessor.java similarity index 97% rename from springwolf-core/src/main/java/io/github/springwolf/core/schemas/postprocessor/AvroSchemaPostProcessor.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/postprocessors/AvroSchemaPostProcessor.java index ba7b135c4..f71278148 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/postprocessor/AvroSchemaPostProcessor.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/postprocessors/AvroSchemaPostProcessor.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.postprocessor; +package io.github.springwolf.core.asyncapi.components.postprocessors; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.swagger.v3.oas.models.media.Schema; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/postprocessor/ExampleGeneratorPostProcessor.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/postprocessors/ExampleGeneratorPostProcessor.java similarity index 81% rename from springwolf-core/src/main/java/io/github/springwolf/core/schemas/postprocessor/ExampleGeneratorPostProcessor.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/postprocessors/ExampleGeneratorPostProcessor.java index 05afa2767..93f0a83b8 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/postprocessor/ExampleGeneratorPostProcessor.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/postprocessors/ExampleGeneratorPostProcessor.java @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.postprocessor; +package io.github.springwolf.core.asyncapi.components.postprocessors; -import io.github.springwolf.core.schemas.example.SchemaWalker; -import io.github.springwolf.core.schemas.example.SchemaWalkerProvider; +import io.github.springwolf.core.asyncapi.components.examples.SchemaWalkerProvider; +import io.github.springwolf.core.asyncapi.components.examples.walkers.SchemaWalker; import io.swagger.v3.oas.models.media.Schema; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/postprocessor/SchemasPostProcessor.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/postprocessors/SchemasPostProcessor.java similarity index 86% rename from springwolf-core/src/main/java/io/github/springwolf/core/schemas/postprocessor/SchemasPostProcessor.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/postprocessors/SchemasPostProcessor.java index ffb10c57c..45b811680 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/postprocessor/SchemasPostProcessor.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/postprocessors/SchemasPostProcessor.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.postprocessor; +package io.github.springwolf.core.asyncapi.components.postprocessors; import io.swagger.v3.oas.models.media.Schema; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/DefaultOperationsService.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/operations/DefaultOperationsService.java similarity index 86% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/DefaultOperationsService.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/operations/DefaultOperationsService.java index 1df27d1e8..35c36000b 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/DefaultOperationsService.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/operations/DefaultOperationsService.java @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi; +package io.github.springwolf.core.asyncapi.operations; import io.github.springwolf.asyncapi.v3.model.operation.Operation; -import io.github.springwolf.core.asyncapi.scanners.channels.OperationMerger; -import io.github.springwolf.core.asyncapi.scanners.channels.OperationsScanner; +import io.github.springwolf.core.asyncapi.scanners.OperationsScanner; +import io.github.springwolf.core.asyncapi.scanners.operations.OperationMerger; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/OperationsService.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/operations/OperationsService.java similarity index 89% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/OperationsService.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/operations/OperationsService.java index 7cef2c708..6a214b6f5 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/OperationsService.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/operations/OperationsService.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi; +package io.github.springwolf.core.asyncapi.operations; import io.github.springwolf.asyncapi.v3.model.operation.Operation; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/ChannelsScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/ChannelsScanner.java similarity index 83% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/ChannelsScanner.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/ChannelsScanner.java index 9518dd771..e8bd9fc0e 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/ChannelsScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/ChannelsScanner.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels; +package io.github.springwolf.core.asyncapi.scanners; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/OperationsScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/OperationsScanner.java similarity index 83% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/OperationsScanner.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/OperationsScanner.java index af1c8783d..25f840817 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/OperationsScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/OperationsScanner.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels; +package io.github.springwolf.core.asyncapi.scanners; import io.github.springwolf.asyncapi.v3.model.operation.Operation; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/beans/DefaultBeanMethodsScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/beans/DefaultBeanMethodsScanner.java index dc8efc350..c3b673841 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/beans/DefaultBeanMethodsScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/beans/DefaultBeanMethodsScanner.java @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.core.asyncapi.scanners.beans; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.AnnotationUtil; -import io.github.springwolf.core.asyncapi.scanners.classes.ConfigurationClassScanner; +import io.github.springwolf.core.asyncapi.scanners.classes.spring.ConfigurationClassScanner; +import io.github.springwolf.core.asyncapi.scanners.common.utils.AnnotationScannerUtil; import lombok.RequiredArgsConstructor; import org.springframework.context.annotation.Bean; @@ -24,7 +24,7 @@ public Set getBeanMethods() { .map(Class::getDeclaredMethods) .map(Arrays::asList) .flatMap(List::stream) - .filter(method -> AnnotationUtil.findAnnotation(Bean.class, method) != null) + .filter(method -> AnnotationScannerUtil.findAnnotation(Bean.class, method) != null) .collect(toSet()); } } diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/BindingProcessorPriority.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/BindingProcessorPriority.java index 1879736be..e638772a2 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/BindingProcessorPriority.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/BindingProcessorPriority.java @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.core.asyncapi.scanners.bindings; -import io.github.springwolf.core.configuration.AsyncApiDocket; +import io.github.springwolf.core.configuration.docket.AsyncApiDocket; /** * Order of binding processors diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/MessageBindingProcessor.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/messages/MessageBindingProcessor.java similarity index 65% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/MessageBindingProcessor.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/messages/MessageBindingProcessor.java index deb29f49b..3f56b3ffd 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/MessageBindingProcessor.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/messages/MessageBindingProcessor.java @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.bindings; +package io.github.springwolf.core.asyncapi.scanners.bindings.messages; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncPublisher; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncPublisher; import java.lang.reflect.Method; import java.util.Optional; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/ProcessedMessageBinding.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/messages/ProcessedMessageBinding.java similarity index 77% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/ProcessedMessageBinding.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/messages/ProcessedMessageBinding.java index bbe3542bb..59f39f10f 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/ProcessedMessageBinding.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/messages/ProcessedMessageBinding.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.bindings; +package io.github.springwolf.core.asyncapi.scanners.bindings.messages; import io.github.springwolf.asyncapi.v3.bindings.MessageBinding; import lombok.Data; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/processor/AbstractOperationBindingProcessor.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/operations/AbstractOperationBindingProcessor.java similarity index 86% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/processor/AbstractOperationBindingProcessor.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/operations/AbstractOperationBindingProcessor.java index bbd3a6bf1..1ceb4615b 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/processor/AbstractOperationBindingProcessor.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/operations/AbstractOperationBindingProcessor.java @@ -1,9 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.bindings.processor; +package io.github.springwolf.core.asyncapi.scanners.bindings.operations; -import io.github.springwolf.core.asyncapi.scanners.bindings.OperationBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.AsyncOperationBinding; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperationBinding; import lombok.extern.slf4j.Slf4j; import org.springframework.context.EmbeddedValueResolverAware; import org.springframework.util.StringUtils; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/OperationBindingProcessor.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/operations/OperationBindingProcessor.java similarity index 65% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/OperationBindingProcessor.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/operations/OperationBindingProcessor.java index 843af187b..db2408a25 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/OperationBindingProcessor.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/operations/OperationBindingProcessor.java @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.bindings; +package io.github.springwolf.core.asyncapi.scanners.bindings.operations; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncPublisher; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncPublisher; import java.lang.reflect.Method; import java.util.Optional; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/ProcessedOperationBinding.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/operations/ProcessedOperationBinding.java similarity index 77% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/ProcessedOperationBinding.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/operations/ProcessedOperationBinding.java index 97c77aeec..6a7467c7b 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/ProcessedOperationBinding.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/bindings/operations/ProcessedOperationBinding.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.bindings; +package io.github.springwolf.core.asyncapi.scanners.bindings.operations; import io.github.springwolf.asyncapi.v3.bindings.OperationBinding; import lombok.Data; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationChannelsScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/AsyncAnnotationChannelsScanner.java similarity index 83% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationChannelsScanner.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/AsyncAnnotationChannelsScanner.java index 174773c7b..7ceed4f05 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationChannelsScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/AsyncAnnotationChannelsScanner.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.channels; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import io.github.springwolf.asyncapi.v3.model.channel.ServerReference; @@ -7,15 +7,16 @@ import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.github.springwolf.asyncapi.v3.model.operation.Operation; import io.github.springwolf.asyncapi.v3.model.server.Server; -import io.github.springwolf.core.asyncapi.scanners.bindings.MessageBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.bindings.OperationBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.channels.ChannelMerger; -import io.github.springwolf.core.asyncapi.scanners.channels.ChannelsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.ChannelsScanner; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.MessageBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.OperationBindingProcessor; import io.github.springwolf.core.asyncapi.scanners.classes.ClassScanner; -import io.github.springwolf.core.configuration.AsyncApiDocketService; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.AsyncAnnotationScanner; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.common.utils.AsyncAnnotationUtil; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; import lombok.extern.slf4j.Slf4j; import java.lang.annotation.Annotation; @@ -66,7 +67,7 @@ private Map.Entry buildChannel(MethodAndAnnotation met Operation operation = buildOperation(operationAnnotation, methodAndAnnotation.method(), channelName); - List servers = AsyncAnnotationScannerUtil.getServers(operationAnnotation, resolver); + List servers = AsyncAnnotationUtil.getServers(operationAnnotation, resolver); if (servers != null && !servers.isEmpty()) { validateServers(servers, operation.getTitle()); channelBuilder.servers(servers.stream() diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/ChannelPriority.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/ChannelPriority.java index d880584d0..0560890ed 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/ChannelPriority.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/ChannelPriority.java @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.core.asyncapi.scanners.channels; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncPublisher; -import io.github.springwolf.core.configuration.AsyncApiDocket; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncPublisher; +import io.github.springwolf.core.configuration.docket.AsyncApiDocket; public class ChannelPriority { /** diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/SimpleChannelsScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/SpringAnnotationChannelsScanner.java similarity index 61% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/SimpleChannelsScanner.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/SpringAnnotationChannelsScanner.java index 520eb8f62..c5b887f0a 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/SimpleChannelsScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/SpringAnnotationChannelsScanner.java @@ -2,20 +2,21 @@ package io.github.springwolf.core.asyncapi.scanners.channels; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; +import io.github.springwolf.core.asyncapi.scanners.ChannelsScanner; +import io.github.springwolf.core.asyncapi.scanners.channels.annotations.SpringAnnotationChannelsScannerDelegator; import io.github.springwolf.core.asyncapi.scanners.classes.ClassScanner; import lombok.RequiredArgsConstructor; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.stream.Stream; @RequiredArgsConstructor -public class SimpleChannelsScanner implements ChannelsScanner { +public class SpringAnnotationChannelsScanner implements ChannelsScanner { private final ClassScanner classScanner; - private final ClassProcessor classProcessor; + private final SpringAnnotationChannelsScannerDelegator springAnnotationChannelsScannerDelegator; @Override public Map scan() { @@ -27,10 +28,8 @@ public Map scan() { } private List> mapToChannels(Set> components) { - return components.stream().flatMap(classProcessor::process).toList(); - } - - public interface ClassProcessor { - Stream> process(Class clazz); + return components.stream() + .flatMap(springAnnotationChannelsScannerDelegator::scan) + .toList(); } } diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationChannelsScannerDelegator.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationChannelsScannerDelegator.java new file mode 100644 index 000000000..198f674de --- /dev/null +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationChannelsScannerDelegator.java @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: Apache-2.0 +package io.github.springwolf.core.asyncapi.scanners.channels.annotations; + +import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; + +import java.util.Map; +import java.util.stream.Stream; + +public interface SpringAnnotationChannelsScannerDelegator { + Stream> scan(Class clazz); +} diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/ClassLevelAnnotationChannelsScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationClassLevelChannelsScanner.java similarity index 78% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/ClassLevelAnnotationChannelsScanner.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationClassLevelChannelsScanner.java index 0668eb641..d86fff299 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/ClassLevelAnnotationChannelsScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationClassLevelChannelsScanner.java @@ -1,14 +1,15 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.channels.annotations; import io.github.springwolf.asyncapi.v3.bindings.ChannelBinding; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeadersBuilder; import io.github.springwolf.core.asyncapi.scanners.bindings.BindingFactory; -import io.github.springwolf.core.asyncapi.scanners.channels.SimpleChannelsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeadersBuilder; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.ClassLevelAnnotationScanner; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.common.utils.AnnotationScannerUtil; import lombok.extern.slf4j.Slf4j; import java.lang.annotation.Annotation; @@ -19,12 +20,12 @@ import java.util.stream.Stream; @Slf4j -public class ClassLevelAnnotationChannelsScanner< +public class SpringAnnotationClassLevelChannelsScanner< ClassAnnotation extends Annotation, MethodAnnotation extends Annotation> extends ClassLevelAnnotationScanner - implements SimpleChannelsScanner.ClassProcessor { + implements SpringAnnotationChannelsScannerDelegator { - public ClassLevelAnnotationChannelsScanner( + public SpringAnnotationClassLevelChannelsScanner( Class classAnnotationClass, Class methodAnnotationClass, BindingFactory bindingFactory, @@ -41,7 +42,7 @@ public ClassLevelAnnotationChannelsScanner( } @Override - public Stream> process(Class clazz) { + public Stream> scan(Class clazz) { log.debug( "Scanning class \"{}\" for @\"{}\" annotated methods", clazz.getName(), classAnnotationClass.getName()); @@ -51,7 +52,7 @@ public Stream> process(Class clazz) { private Stream> mapClassToChannel(Class component) { log.debug("Mapping class \"{}\" to channels", component.getName()); - ClassAnnotation classAnnotation = AnnotationUtil.findAnnotationOrThrow(classAnnotationClass, component); + ClassAnnotation classAnnotation = AnnotationScannerUtil.findAnnotationOrThrow(classAnnotationClass, component); Set annotatedMethods = getAnnotatedMethods(component); if (annotatedMethods.isEmpty()) { diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/MethodLevelAnnotationChannelsScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationMethodLevelChannelsScanner.java similarity index 76% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/MethodLevelAnnotationChannelsScanner.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationMethodLevelChannelsScanner.java index 6a3429bf8..d6678bf84 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/MethodLevelAnnotationChannelsScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationMethodLevelChannelsScanner.java @@ -1,14 +1,15 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.channels.annotations; import io.github.springwolf.asyncapi.v3.bindings.ChannelBinding; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageObject; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; +import io.github.springwolf.core.asyncapi.components.ComponentsService; import io.github.springwolf.core.asyncapi.scanners.bindings.BindingFactory; -import io.github.springwolf.core.asyncapi.scanners.channels.SimpleChannelsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.MethodLevelAnnotationScanner; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.common.utils.AnnotationScannerUtil; import lombok.extern.slf4j.Slf4j; import java.lang.annotation.Annotation; @@ -19,13 +20,13 @@ import java.util.stream.Stream; @Slf4j -public class MethodLevelAnnotationChannelsScanner - extends MethodLevelAnnotationScanner implements SimpleChannelsScanner.ClassProcessor { +public class SpringAnnotationMethodLevelChannelsScanner + extends MethodLevelAnnotationScanner implements SpringAnnotationChannelsScannerDelegator { private final Class methodAnnotationClass; private final PayloadClassExtractor payloadClassExtractor; - public MethodLevelAnnotationChannelsScanner( + public SpringAnnotationMethodLevelChannelsScanner( Class methodAnnotationClass, BindingFactory bindingFactory, PayloadClassExtractor payloadClassExtractor, @@ -36,7 +37,7 @@ public MethodLevelAnnotationChannelsScanner( } @Override - public Stream> process(Class clazz) { + public Stream> scan(Class clazz) { log.debug( "Scanning class \"{}\" for @\"{}\" annotated methods", clazz.getName(), @@ -44,14 +45,14 @@ public Stream> process(Class clazz) { return Arrays.stream(clazz.getDeclaredMethods()) .filter(method -> !method.isBridge()) - .filter(method -> AnnotationUtil.findAnnotation(methodAnnotationClass, method) != null) + .filter(method -> AnnotationScannerUtil.findAnnotation(methodAnnotationClass, method) != null) .map(this::mapMethodToChannel); } private Map.Entry mapMethodToChannel(Method method) { log.debug("Mapping method \"{}\" to channels", method.getName()); - MethodAnnotation annotation = AnnotationUtil.findAnnotationOrThrow(methodAnnotationClass, method); + MethodAnnotation annotation = AnnotationScannerUtil.findAnnotationOrThrow(methodAnnotationClass, method); String channelName = bindingFactory.getChannelName(annotation); Class payload = payloadClassExtractor.extractFrom(method); diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/ClassScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/ClassScanner.java index 65ea316a4..3e71cacf3 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/ClassScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/ClassScanner.java @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.core.asyncapi.scanners.classes; -import io.github.springwolf.core.configuration.AsyncApiDocket; +import io.github.springwolf.core.configuration.docket.AsyncApiDocket; import java.util.Set; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/SpringwolfClassScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/SpringwolfClassScanner.java index fa4ab5fd5..1405b84e1 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/SpringwolfClassScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/SpringwolfClassScanner.java @@ -2,6 +2,7 @@ package io.github.springwolf.core.asyncapi.scanners.classes; import io.github.springwolf.core.asyncapi.scanners.beans.BeanMethodsScanner; +import io.github.springwolf.core.asyncapi.scanners.classes.spring.ComponentClassScanner; import lombok.RequiredArgsConstructor; import java.lang.reflect.Method; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/ComponentClassScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/spring/ComponentClassScanner.java similarity index 64% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/ComponentClassScanner.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/spring/ComponentClassScanner.java index ddbfa4981..48d16013e 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/ComponentClassScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/spring/ComponentClassScanner.java @@ -1,7 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.classes; +package io.github.springwolf.core.asyncapi.scanners.classes.spring; -import io.github.springwolf.core.configuration.AsyncApiDocketService; +import io.github.springwolf.core.asyncapi.scanners.classes.ClassScanner; +import io.github.springwolf.core.asyncapi.scanners.classes.spring.annotations.AnnotationClassScanner; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; import org.springframework.core.env.Environment; import org.springframework.stereotype.Component; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/ConfigurationClassScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/spring/ConfigurationClassScanner.java similarity index 61% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/ConfigurationClassScanner.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/spring/ConfigurationClassScanner.java index 96bcbdeec..36bc139f2 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/ConfigurationClassScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/spring/ConfigurationClassScanner.java @@ -1,7 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.classes; +package io.github.springwolf.core.asyncapi.scanners.classes.spring; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.AnnotationUtil; +import io.github.springwolf.core.asyncapi.scanners.classes.ClassScanner; +import io.github.springwolf.core.asyncapi.scanners.common.utils.AnnotationScannerUtil; import lombok.RequiredArgsConstructor; import org.springframework.context.annotation.Configuration; @@ -17,7 +18,7 @@ public class ConfigurationClassScanner implements ClassScanner { public Set> scan() { return scanner.scan().stream() // All Configurations are also Components - .filter((cls) -> AnnotationUtil.findAnnotation(Configuration.class, cls) != null) + .filter((cls) -> AnnotationScannerUtil.findAnnotation(Configuration.class, cls) != null) .collect(Collectors.toSet()); } } diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/AnnotationClassScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/spring/annotations/AnnotationClassScanner.java similarity index 90% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/AnnotationClassScanner.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/spring/annotations/AnnotationClassScanner.java index cccfb01c8..d56f570f6 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/AnnotationClassScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/classes/spring/annotations/AnnotationClassScanner.java @@ -1,7 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.classes; +package io.github.springwolf.core.asyncapi.scanners.classes.spring.annotations; -import io.github.springwolf.core.configuration.AsyncApiDocketService; +import io.github.springwolf.core.asyncapi.scanners.classes.ClassScanner; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.config.BeanDefinition; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/AsyncAnnotationScanner.java similarity index 80% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationScanner.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/AsyncAnnotationScanner.java index bbfe5668d..a5a83a41a 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/AsyncAnnotationScanner.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.common; import io.github.springwolf.asyncapi.v3.bindings.MessageBinding; import io.github.springwolf.asyncapi.v3.bindings.OperationBinding; @@ -12,12 +12,14 @@ import io.github.springwolf.asyncapi.v3.model.operation.OperationAction; import io.github.springwolf.asyncapi.v3.model.schema.MultiFormatSchema; import io.github.springwolf.asyncapi.v3.model.schema.SchemaReference; -import io.github.springwolf.core.asyncapi.scanners.bindings.MessageBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.bindings.OperationBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaders; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaders; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.MessageBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.OperationBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.common.utils.AnnotationScannerUtil; +import io.github.springwolf.core.asyncapi.scanners.common.utils.AsyncAnnotationUtil; import io.swagger.v3.oas.annotations.media.Schema; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -55,9 +57,9 @@ protected Stream> getAnnotatedMethods(Class type) { return Arrays.stream(type.getDeclaredMethods()) .filter(method -> !method.isBridge()) - .filter(method -> AnnotationUtil.findAnnotation(annotationClass, method) != null) + .filter(method -> AnnotationScannerUtil.findAnnotation(annotationClass, method) != null) .peek(method -> log.debug("Mapping method \"{}\" to channels", method.getName())) - .flatMap(method -> AnnotationUtil.findAnnotations(annotationClass, method).stream() + .flatMap(method -> AnnotationScannerUtil.findAnnotations(annotationClass, method).stream() .map(annotation -> new MethodAndAnnotation<>(method, annotation))); } @@ -70,7 +72,7 @@ protected Operation buildOperation(AsyncOperation asyncOperation, Method method, String operationTitle = channelName + "_" + this.asyncAnnotationProvider.getOperationType().type; Map operationBinding = - AsyncAnnotationScannerUtil.processOperationBindingFromAnnotation(method, operationBindingProcessors); + AsyncAnnotationUtil.processOperationBindingFromAnnotation(method, operationBindingProcessors); Map opBinding = operationBinding != null ? new HashMap<>(operationBinding) : null; MessageObject message = buildMessage(asyncOperation, method); @@ -90,7 +92,7 @@ protected MessageObject buildMessage(AsyncOperation operationData, Method method String modelName = this.componentsService.registerSchema( payloadType, operationData.message().contentType()); - AsyncHeaders asyncHeaders = AsyncAnnotationScannerUtil.getAsyncHeaders(operationData, resolver); + AsyncHeaders asyncHeaders = AsyncAnnotationUtil.getAsyncHeaders(operationData, resolver); String headerModelName = this.componentsService.registerSchema(asyncHeaders); var headers = MessageHeaders.of(MessageReference.toSchema(headerModelName)); @@ -98,7 +100,7 @@ protected MessageObject buildMessage(AsyncOperation operationData, Method method String description = schema != null ? schema.description() : null; Map messageBinding = - AsyncAnnotationScannerUtil.processMessageBindingFromAnnotation(method, messageBindingProcessors); + AsyncAnnotationUtil.processMessageBindingFromAnnotation(method, messageBindingProcessors); var messagePayload = MessagePayload.of(MultiFormatSchema.builder() .schema(SchemaReference.fromSchema(modelName)) @@ -115,7 +117,7 @@ protected MessageObject buildMessage(AsyncOperation operationData, Method method // Retrieve the Message information obtained from the @AsyncMessage annotation. These values have higher // priority so if we find them, we need to override the default values. - AsyncAnnotationScannerUtil.processAsyncMessageAnnotation(builder, operationData.message(), this.resolver); + AsyncAnnotationUtil.processAsyncMessageAnnotation(builder, operationData.message(), this.resolver); MessageObject message = builder.build(); this.componentsService.registerMessage(message); diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/ClassLevelAnnotationScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/ClassLevelAnnotationScanner.java similarity index 81% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/ClassLevelAnnotationScanner.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/ClassLevelAnnotationScanner.java index 6eeb407d3..05887528f 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/ClassLevelAnnotationScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/ClassLevelAnnotationScanner.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.common; import io.github.springwolf.asyncapi.v3.bindings.MessageBinding; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageHeaders; @@ -8,10 +8,12 @@ import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.github.springwolf.asyncapi.v3.model.schema.MultiFormatSchema; import io.github.springwolf.asyncapi.v3.model.schema.SchemaReference; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeadersBuilder; import io.github.springwolf.core.asyncapi.scanners.bindings.BindingFactory; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeadersBuilder; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.common.utils.AnnotationScannerUtil; +import io.github.springwolf.core.asyncapi.scanners.operations.annotations.SpringAnnotationClassLevelOperationsScanner; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.core.annotation.AnnotationUtils; @@ -22,8 +24,8 @@ import java.util.Map; import java.util.Set; -import static io.github.springwolf.core.asyncapi.MessageHelper.toMessagesMap; -import static io.github.springwolf.core.asyncapi.MessageHelper.toOperationsMessagesMap; +import static io.github.springwolf.core.asyncapi.scanners.common.MessageHelper.toMessagesMap; +import static io.github.springwolf.core.asyncapi.scanners.common.MessageHelper.toOperationsMessagesMap; import static java.util.stream.Collectors.toSet; @Slf4j @@ -44,7 +46,7 @@ protected enum MessageType { } protected boolean isClassAnnotated(Class component) { - return AnnotationUtil.findAnnotation(classAnnotationClass, component) != null; + return AnnotationScannerUtil.findAnnotation(classAnnotationClass, component) != null; } protected Set getAnnotatedMethods(Class clazz) { @@ -62,7 +64,7 @@ protected Set getAnnotatedMethods(Class clazz) { protected Map buildMessages( ClassAnnotation classAnnotation, Set methods, - ClassLevelAnnotationOperationsScanner.MessageType messageType) { + SpringAnnotationClassLevelOperationsScanner.MessageType messageType) { Set messages = methods.stream() .map((Method method) -> { Class payloadType = payloadClassExtractor.extractFrom(method); diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/MessageHelper.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/MessageHelper.java similarity index 96% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/MessageHelper.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/MessageHelper.java index 69569eb23..ca3c2fa31 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/MessageHelper.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/MessageHelper.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi; +package io.github.springwolf.core.asyncapi.scanners.common; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageObject; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/MethodLevelAnnotationScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/MethodLevelAnnotationScanner.java similarity index 90% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/MethodLevelAnnotationScanner.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/MethodLevelAnnotationScanner.java index e6a5d7356..aa1ad5998 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/MethodLevelAnnotationScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/MethodLevelAnnotationScanner.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.common; import io.github.springwolf.asyncapi.v3.bindings.MessageBinding; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageHeaders; @@ -8,9 +8,9 @@ import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.github.springwolf.asyncapi.v3.model.schema.MultiFormatSchema; import io.github.springwolf.asyncapi.v3.model.schema.SchemaReference; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaders; import io.github.springwolf.core.asyncapi.scanners.bindings.BindingFactory; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaders; -import io.github.springwolf.core.schemas.ComponentsService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/payload/PayloadClassExtractor.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/payload/PayloadClassExtractor.java similarity index 98% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/payload/PayloadClassExtractor.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/payload/PayloadClassExtractor.java index 72b0137af..7f2bf9644 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/payload/PayloadClassExtractor.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/payload/PayloadClassExtractor.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.payload; +package io.github.springwolf.core.asyncapi.scanners.common.payload; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; import lombok.RequiredArgsConstructor; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AnnotationUtil.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/utils/AnnotationScannerUtil.java similarity index 92% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AnnotationUtil.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/utils/AnnotationScannerUtil.java index 50defd241..91ea0d498 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AnnotationUtil.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/utils/AnnotationScannerUtil.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.common.utils; import org.springframework.core.annotation.MergedAnnotation; import org.springframework.core.annotation.MergedAnnotationCollectors; @@ -12,9 +12,9 @@ import java.lang.reflect.AnnotatedElement; import java.util.Set; -public class AnnotationUtil { +public class AnnotationScannerUtil { - private AnnotationUtil() {} + private AnnotationScannerUtil() {} public static T findAnnotationOrThrow(Class annotationClass, AnnotatedElement element) { T annotation = findAnnotation(annotationClass, element); diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationScannerUtil.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/utils/AsyncAnnotationUtil.java similarity index 86% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationScannerUtil.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/utils/AsyncAnnotationUtil.java index 9f61dd11e..1a99e322d 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationScannerUtil.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/utils/AsyncAnnotationUtil.java @@ -1,17 +1,17 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.common.utils; import io.github.springwolf.asyncapi.v3.bindings.MessageBinding; import io.github.springwolf.asyncapi.v3.bindings.OperationBinding; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageObject; -import io.github.springwolf.core.asyncapi.scanners.bindings.MessageBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.bindings.OperationBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedMessageBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncMessage; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaderSchema; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaders; +import io.github.springwolf.core.asyncapi.annotations.AsyncMessage; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaderSchema; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaders; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.MessageBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.ProcessedMessageBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.OperationBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.ProcessedOperationBinding; import org.springframework.util.StringUtils; import org.springframework.util.StringValueResolver; @@ -24,8 +24,8 @@ import static java.util.stream.Collectors.groupingBy; -class AsyncAnnotationScannerUtil { - private AsyncAnnotationScannerUtil() {} +public class AsyncAnnotationUtil { + private AsyncAnnotationUtil() {} public static AsyncHeaders getAsyncHeaders(AsyncOperation op, StringValueResolver resolver) { if (op.headers().values().length == 0) { diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/OperationMerger.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/OperationMerger.java similarity index 93% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/OperationMerger.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/OperationMerger.java index fbaef6752..4a021f047 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/OperationMerger.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/OperationMerger.java @@ -1,7 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels; +package io.github.springwolf.core.asyncapi.scanners.operations; -import io.github.springwolf.asyncapi.v3.model.channel.Channel; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.github.springwolf.asyncapi.v3.model.operation.Operation; @@ -12,7 +11,7 @@ import java.util.Map; /** - * Util to merge multiple {@link Channel}s + * Util to merge multiple {@link Operation}s */ public class OperationMerger { diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/SimpleOperationsScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/SpringAnnotationOperationsScanner.java similarity index 60% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/SimpleOperationsScanner.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/SpringAnnotationOperationsScanner.java index 4ae41fa1a..67f5824d1 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/SimpleOperationsScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/SpringAnnotationOperationsScanner.java @@ -1,21 +1,22 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels; +package io.github.springwolf.core.asyncapi.scanners.operations; import io.github.springwolf.asyncapi.v3.model.operation.Operation; +import io.github.springwolf.core.asyncapi.scanners.OperationsScanner; import io.github.springwolf.core.asyncapi.scanners.classes.ClassScanner; +import io.github.springwolf.core.asyncapi.scanners.operations.annotations.SpringAnnotationOperationsScannerDelegator; import lombok.RequiredArgsConstructor; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.stream.Stream; @RequiredArgsConstructor -public class SimpleOperationsScanner implements OperationsScanner { +public class SpringAnnotationOperationsScanner implements OperationsScanner { private final ClassScanner classScanner; - private final ClassProcessor classProcessor; + private final SpringAnnotationOperationsScannerDelegator classProcessor; @Override public Map scan() { @@ -27,10 +28,6 @@ public Map scan() { } private List> mapToOperations(Set> components) { - return components.stream().flatMap(classProcessor::process).toList(); - } - - public interface ClassProcessor { - Stream> process(Class clazz); + return components.stream().flatMap(classProcessor::scan).toList(); } } diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationOperationsScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/AsyncAnnotationOperationsScanner.java similarity index 75% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationOperationsScanner.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/AsyncAnnotationOperationsScanner.java index 4144d1920..6cee589b0 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationOperationsScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/AsyncAnnotationOperationsScanner.java @@ -1,15 +1,16 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.operations.annotations; import io.github.springwolf.asyncapi.v3.model.operation.Operation; -import io.github.springwolf.core.asyncapi.scanners.bindings.MessageBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.bindings.OperationBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.channels.OperationMerger; -import io.github.springwolf.core.asyncapi.scanners.channels.OperationsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.OperationsScanner; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.MessageBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.OperationBindingProcessor; import io.github.springwolf.core.asyncapi.scanners.classes.ClassScanner; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.AsyncAnnotationScanner; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.operations.OperationMerger; import lombok.extern.slf4j.Slf4j; import java.lang.annotation.Annotation; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/ClassLevelAnnotationOperationsScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/SpringAnnotationClassLevelOperationsScanner.java similarity index 79% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/ClassLevelAnnotationOperationsScanner.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/SpringAnnotationClassLevelOperationsScanner.java index bc70b28e0..74b0db0c8 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/ClassLevelAnnotationOperationsScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/SpringAnnotationClassLevelOperationsScanner.java @@ -1,16 +1,17 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.operations.annotations; import io.github.springwolf.asyncapi.v3.bindings.OperationBinding; import io.github.springwolf.asyncapi.v3.model.channel.ChannelReference; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.github.springwolf.asyncapi.v3.model.operation.Operation; import io.github.springwolf.asyncapi.v3.model.operation.OperationAction; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeadersBuilder; import io.github.springwolf.core.asyncapi.scanners.bindings.BindingFactory; -import io.github.springwolf.core.asyncapi.scanners.channels.SimpleOperationsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeadersBuilder; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.ClassLevelAnnotationScanner; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.common.utils.AnnotationScannerUtil; import lombok.extern.slf4j.Slf4j; import java.lang.annotation.Annotation; @@ -21,12 +22,12 @@ import java.util.stream.Stream; @Slf4j -public class ClassLevelAnnotationOperationsScanner< +public class SpringAnnotationClassLevelOperationsScanner< ClassAnnotation extends Annotation, MethodAnnotation extends Annotation> extends ClassLevelAnnotationScanner - implements SimpleOperationsScanner.ClassProcessor { + implements SpringAnnotationOperationsScannerDelegator { - public ClassLevelAnnotationOperationsScanner( + public SpringAnnotationClassLevelOperationsScanner( Class classAnnotationClass, Class methodAnnotationClass, BindingFactory bindingFactory, @@ -43,7 +44,7 @@ public ClassLevelAnnotationOperationsScanner( } @Override - public Stream> process(Class clazz) { + public Stream> scan(Class clazz) { log.debug( "Scanning class \"{}\" for @\"{}\" annotated methods", clazz.getName(), classAnnotationClass.getName()); @@ -53,7 +54,7 @@ public Stream> process(Class clazz) { private Stream> mapClassToOperation(Class component) { log.debug("Mapping class \"{}\" to operations", component.getName()); - ClassAnnotation classAnnotation = AnnotationUtil.findAnnotationOrThrow(classAnnotationClass, component); + ClassAnnotation classAnnotation = AnnotationScannerUtil.findAnnotationOrThrow(classAnnotationClass, component); Set annotatedMethods = getAnnotatedMethods(component); if (annotatedMethods.isEmpty()) { diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/MethodLevelAnnotationOperationsScanner.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/SpringAnnotationMethodLevelOperationsScanner.java similarity index 77% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/MethodLevelAnnotationOperationsScanner.java rename to springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/SpringAnnotationMethodLevelOperationsScanner.java index 5fb6d7fdc..da7e20927 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/MethodLevelAnnotationOperationsScanner.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/SpringAnnotationMethodLevelOperationsScanner.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.operations.annotations; import io.github.springwolf.asyncapi.v3.bindings.OperationBinding; import io.github.springwolf.asyncapi.v3.model.channel.ChannelReference; @@ -7,10 +7,11 @@ import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.github.springwolf.asyncapi.v3.model.operation.Operation; import io.github.springwolf.asyncapi.v3.model.operation.OperationAction; +import io.github.springwolf.core.asyncapi.components.ComponentsService; import io.github.springwolf.core.asyncapi.scanners.bindings.BindingFactory; -import io.github.springwolf.core.asyncapi.scanners.channels.SimpleOperationsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.MethodLevelAnnotationScanner; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.common.utils.AnnotationScannerUtil; import lombok.extern.slf4j.Slf4j; import java.lang.annotation.Annotation; @@ -22,13 +23,13 @@ import java.util.stream.Stream; @Slf4j -public class MethodLevelAnnotationOperationsScanner - extends MethodLevelAnnotationScanner implements SimpleOperationsScanner.ClassProcessor { +public class SpringAnnotationMethodLevelOperationsScanner + extends MethodLevelAnnotationScanner implements SpringAnnotationOperationsScannerDelegator { private final Class methodAnnotationClass; private final PayloadClassExtractor payloadClassExtractor; - public MethodLevelAnnotationOperationsScanner( + public SpringAnnotationMethodLevelOperationsScanner( Class methodAnnotationClass, BindingFactory bindingFactory, PayloadClassExtractor payloadClassExtractor, @@ -39,7 +40,7 @@ public MethodLevelAnnotationOperationsScanner( } @Override - public Stream> process(Class clazz) { + public Stream> scan(Class clazz) { log.debug( "Scanning class \"{}\" for @\"{}\" annotated methods", clazz.getName(), @@ -47,14 +48,14 @@ public Stream> process(Class clazz) { return Arrays.stream(clazz.getDeclaredMethods()) .filter(method -> !method.isBridge()) - .filter(method -> AnnotationUtil.findAnnotation(methodAnnotationClass, method) != null) + .filter(method -> AnnotationScannerUtil.findAnnotation(methodAnnotationClass, method) != null) .map(this::mapMethodToOperation); } private Map.Entry mapMethodToOperation(Method method) { log.debug("Mapping method \"{}\" to operations", method.getName()); - MethodAnnotation annotation = AnnotationUtil.findAnnotationOrThrow(methodAnnotationClass, method); + MethodAnnotation annotation = AnnotationScannerUtil.findAnnotationOrThrow(methodAnnotationClass, method); String channelName = bindingFactory.getChannelName(annotation); String operationId = channelName + "_" + OperationAction.RECEIVE + "_" + method.getName(); diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/SpringAnnotationOperationsScannerDelegator.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/SpringAnnotationOperationsScannerDelegator.java new file mode 100644 index 000000000..7f80e67b6 --- /dev/null +++ b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/SpringAnnotationOperationsScannerDelegator.java @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: Apache-2.0 +package io.github.springwolf.core.asyncapi.scanners.operations.annotations; + +import io.github.springwolf.asyncapi.v3.model.operation.Operation; + +import java.util.Map; +import java.util.stream.Stream; + +public interface SpringAnnotationOperationsScannerDelegator { + Stream> scan(Class clazz); +} diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/bindings/EmptyChannelBinding.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/bindings/EmptyChannelBinding.java deleted file mode 100644 index 9f019908c..000000000 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/bindings/EmptyChannelBinding.java +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.types.channel.bindings; - -import io.github.springwolf.asyncapi.v3.bindings.ChannelBinding; - -public class EmptyChannelBinding extends ChannelBinding {} diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/bindings/EmptyOperationBinding.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/bindings/EmptyOperationBinding.java deleted file mode 100644 index b99b3ca5e..000000000 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/bindings/EmptyOperationBinding.java +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.types.channel.operation.bindings; - -import io.github.springwolf.asyncapi.v3.bindings.OperationBinding; - -public class EmptyOperationBinding extends OperationBinding {} diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/message/bindings/EmptyMessageBinding.java b/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/message/bindings/EmptyMessageBinding.java deleted file mode 100644 index 7259dba8c..000000000 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/types/channel/operation/message/bindings/EmptyMessageBinding.java +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.types.channel.operation.message.bindings; - -import io.github.springwolf.asyncapi.v3.bindings.MessageBinding; - -public class EmptyMessageBinding extends MessageBinding {} diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/SpringwolfAutoConfiguration.java b/springwolf-core/src/main/java/io/github/springwolf/core/configuration/SpringwolfAutoConfiguration.java similarity index 70% rename from springwolf-core/src/main/java/io/github/springwolf/core/SpringwolfAutoConfiguration.java rename to springwolf-core/src/main/java/io/github/springwolf/core/configuration/SpringwolfAutoConfiguration.java index 76d0b896d..b8284b26e 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/SpringwolfAutoConfiguration.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/configuration/SpringwolfAutoConfiguration.java @@ -1,37 +1,37 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core; +package io.github.springwolf.core.configuration; +import io.github.springwolf.core.SpringwolfInitApplicationListener; import io.github.springwolf.core.asyncapi.AsyncApiCustomizer; import io.github.springwolf.core.asyncapi.AsyncApiService; -import io.github.springwolf.core.asyncapi.ChannelsService; import io.github.springwolf.core.asyncapi.DefaultAsyncApiService; -import io.github.springwolf.core.asyncapi.DefaultChannelsService; -import io.github.springwolf.core.asyncapi.DefaultOperationsService; -import io.github.springwolf.core.asyncapi.OperationsService; -import io.github.springwolf.core.asyncapi.SpringwolfInitApplicationListener; -import io.github.springwolf.core.asyncapi.scanners.channels.ChannelsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.OperationsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; -import io.github.springwolf.core.configuration.AsyncApiDocketService; -import io.github.springwolf.core.configuration.DefaultAsyncApiDocketService; +import io.github.springwolf.core.asyncapi.channels.ChannelsService; +import io.github.springwolf.core.asyncapi.channels.DefaultChannelsService; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.components.DefaultComponentsService; +import io.github.springwolf.core.asyncapi.components.SwaggerSchemaUtil; +import io.github.springwolf.core.asyncapi.components.examples.SchemaWalkerProvider; +import io.github.springwolf.core.asyncapi.components.examples.walkers.DefaultSchemaWalker; +import io.github.springwolf.core.asyncapi.components.examples.walkers.SchemaWalker; +import io.github.springwolf.core.asyncapi.components.examples.walkers.json.ExampleJsonValueGenerator; +import io.github.springwolf.core.asyncapi.components.examples.walkers.xml.DefaultExampleXmlValueSerializer; +import io.github.springwolf.core.asyncapi.components.examples.walkers.xml.ExampleXmlValueGenerator; +import io.github.springwolf.core.asyncapi.components.examples.walkers.xml.ExampleXmlValueSerializer; +import io.github.springwolf.core.asyncapi.components.examples.walkers.yaml.DefaultExampleYamlValueSerializer; +import io.github.springwolf.core.asyncapi.components.examples.walkers.yaml.ExampleYamlValueGenerator; +import io.github.springwolf.core.asyncapi.components.examples.walkers.yaml.ExampleYamlValueSerializer; +import io.github.springwolf.core.asyncapi.components.postprocessors.AvroSchemaPostProcessor; +import io.github.springwolf.core.asyncapi.components.postprocessors.ExampleGeneratorPostProcessor; +import io.github.springwolf.core.asyncapi.components.postprocessors.SchemasPostProcessor; +import io.github.springwolf.core.asyncapi.operations.DefaultOperationsService; +import io.github.springwolf.core.asyncapi.operations.OperationsService; +import io.github.springwolf.core.asyncapi.scanners.ChannelsScanner; +import io.github.springwolf.core.asyncapi.scanners.OperationsScanner; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; +import io.github.springwolf.core.configuration.docket.DefaultAsyncApiDocketService; import io.github.springwolf.core.configuration.properties.SpringwolfConfigConstants; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; -import io.github.springwolf.core.schemas.ComponentsService; -import io.github.springwolf.core.schemas.DefaultComponentsService; -import io.github.springwolf.core.schemas.SwaggerSchemaUtil; -import io.github.springwolf.core.schemas.example.DefaultExampleXmlValueSerializer; -import io.github.springwolf.core.schemas.example.DefaultExampleYamlValueSerializer; -import io.github.springwolf.core.schemas.example.DefaultSchemaWalker; -import io.github.springwolf.core.schemas.example.ExampleJsonValueGenerator; -import io.github.springwolf.core.schemas.example.ExampleXmlValueGenerator; -import io.github.springwolf.core.schemas.example.ExampleXmlValueSerializer; -import io.github.springwolf.core.schemas.example.ExampleYamlValueGenerator; -import io.github.springwolf.core.schemas.example.ExampleYamlValueSerializer; -import io.github.springwolf.core.schemas.example.SchemaWalker; -import io.github.springwolf.core.schemas.example.SchemaWalkerProvider; -import io.github.springwolf.core.schemas.postprocessor.AvroSchemaPostProcessor; -import io.github.springwolf.core.schemas.postprocessor.ExampleGeneratorPostProcessor; -import io.github.springwolf.core.schemas.postprocessor.SchemasPostProcessor; import io.swagger.v3.core.converter.ModelConverter; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/SpringwolfScannerConfiguration.java b/springwolf-core/src/main/java/io/github/springwolf/core/configuration/SpringwolfScannerConfiguration.java similarity index 86% rename from springwolf-core/src/main/java/io/github/springwolf/core/SpringwolfScannerConfiguration.java rename to springwolf-core/src/main/java/io/github/springwolf/core/configuration/SpringwolfScannerConfiguration.java index 4ddfe9ace..a0c9e7d8c 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/SpringwolfScannerConfiguration.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/configuration/SpringwolfScannerConfiguration.java @@ -1,24 +1,24 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core; +package io.github.springwolf.core.configuration; import io.github.springwolf.asyncapi.v3.model.operation.OperationAction; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; +import io.github.springwolf.core.asyncapi.annotations.AsyncPublisher; +import io.github.springwolf.core.asyncapi.components.ComponentsService; import io.github.springwolf.core.asyncapi.scanners.beans.BeanMethodsScanner; import io.github.springwolf.core.asyncapi.scanners.beans.DefaultBeanMethodsScanner; -import io.github.springwolf.core.asyncapi.scanners.bindings.MessageBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.bindings.OperationBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.MessageBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.OperationBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.channels.AsyncAnnotationChannelsScanner; import io.github.springwolf.core.asyncapi.scanners.channels.ChannelPriority; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.AsyncAnnotationChannelsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.AsyncAnnotationOperationsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.AsyncAnnotationScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncPublisher; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; -import io.github.springwolf.core.asyncapi.scanners.classes.ComponentClassScanner; -import io.github.springwolf.core.asyncapi.scanners.classes.ConfigurationClassScanner; import io.github.springwolf.core.asyncapi.scanners.classes.SpringwolfClassScanner; -import io.github.springwolf.core.configuration.AsyncApiDocketService; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.classes.spring.ComponentClassScanner; +import io.github.springwolf.core.asyncapi.scanners.classes.spring.ConfigurationClassScanner; +import io.github.springwolf.core.asyncapi.scanners.common.AsyncAnnotationScanner; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.operations.annotations.AsyncAnnotationOperationsScanner; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/SpringwolfWebConfiguration.java b/springwolf-core/src/main/java/io/github/springwolf/core/configuration/SpringwolfWebConfiguration.java similarity index 83% rename from springwolf-core/src/main/java/io/github/springwolf/core/SpringwolfWebConfiguration.java rename to springwolf-core/src/main/java/io/github/springwolf/core/configuration/SpringwolfWebConfiguration.java index 89b4c55e4..05e1095e8 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/SpringwolfWebConfiguration.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/configuration/SpringwolfWebConfiguration.java @@ -1,14 +1,14 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core; +package io.github.springwolf.core.configuration; import com.fasterxml.jackson.databind.ObjectMapper; import io.github.springwolf.asyncapi.v3.jackson.AsyncApiSerializerService; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; +import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializerService; import io.github.springwolf.core.asyncapi.AsyncApiService; -import io.github.springwolf.core.asyncapi.controller.ActuatorAsyncApiController; -import io.github.springwolf.core.asyncapi.controller.AsyncApiController; -import io.github.springwolf.core.asyncapi.controller.PublishingPayloadCreator; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.controller.ActuatorAsyncApiController; +import io.github.springwolf.core.controller.AsyncApiController; +import io.github.springwolf.core.controller.PublishingPayloadCreator; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; @@ -48,6 +48,6 @@ public ActuatorAsyncApiController actuatorAsyncApiController( @Bean @ConditionalOnMissingBean public AsyncApiSerializerService asyncApiSerializerService() { - return new DefaultAsyncApiSerializer(); + return new DefaultAsyncApiSerializerService(); } } diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/configuration/AsyncApiDocket.java b/springwolf-core/src/main/java/io/github/springwolf/core/configuration/docket/AsyncApiDocket.java similarity index 96% rename from springwolf-core/src/main/java/io/github/springwolf/core/configuration/AsyncApiDocket.java rename to springwolf-core/src/main/java/io/github/springwolf/core/configuration/docket/AsyncApiDocket.java index c95393697..9cb2470fa 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/configuration/AsyncApiDocket.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/configuration/docket/AsyncApiDocket.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.configuration; +package io.github.springwolf.core.configuration.docket; import io.github.springwolf.asyncapi.v3.model.info.Info; import io.github.springwolf.asyncapi.v3.model.server.Server; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/configuration/AsyncApiDocketService.java b/springwolf-core/src/main/java/io/github/springwolf/core/configuration/docket/AsyncApiDocketService.java similarity index 68% rename from springwolf-core/src/main/java/io/github/springwolf/core/configuration/AsyncApiDocketService.java rename to springwolf-core/src/main/java/io/github/springwolf/core/configuration/docket/AsyncApiDocketService.java index 30da7b70d..b04746c19 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/configuration/AsyncApiDocketService.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/configuration/docket/AsyncApiDocketService.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.configuration; +package io.github.springwolf.core.configuration.docket; public interface AsyncApiDocketService { AsyncApiDocket getAsyncApiDocket(); diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/configuration/DefaultAsyncApiDocketService.java b/springwolf-core/src/main/java/io/github/springwolf/core/configuration/docket/DefaultAsyncApiDocketService.java similarity index 98% rename from springwolf-core/src/main/java/io/github/springwolf/core/configuration/DefaultAsyncApiDocketService.java rename to springwolf-core/src/main/java/io/github/springwolf/core/configuration/docket/DefaultAsyncApiDocketService.java index 10cfc49b9..2883bf2db 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/configuration/DefaultAsyncApiDocketService.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/configuration/docket/DefaultAsyncApiDocketService.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.configuration; +package io.github.springwolf.core.configuration.docket; import io.github.springwolf.asyncapi.v3.model.info.Info; import io.github.springwolf.core.configuration.properties.SpringwolfConfigConstants; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/configuration/properties/SpringwolfConfigProperties.java b/springwolf-core/src/main/java/io/github/springwolf/core/configuration/properties/SpringwolfConfigProperties.java index d9221ed28..be8d8836c 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/configuration/properties/SpringwolfConfigProperties.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/configuration/properties/SpringwolfConfigProperties.java @@ -5,7 +5,7 @@ import io.github.springwolf.asyncapi.v3.model.info.Contact; import io.github.springwolf.asyncapi.v3.model.info.License; import io.github.springwolf.asyncapi.v3.model.server.Server; -import io.github.springwolf.core.configuration.AsyncApiDocket; +import io.github.springwolf.core.configuration.docket.AsyncApiDocket; import lombok.Getter; import lombok.Setter; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/controller/ActuatorAsyncApiController.java b/springwolf-core/src/main/java/io/github/springwolf/core/controller/ActuatorAsyncApiController.java similarity index 96% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/controller/ActuatorAsyncApiController.java rename to springwolf-core/src/main/java/io/github/springwolf/core/controller/ActuatorAsyncApiController.java index 1d0625429..527a67121 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/controller/ActuatorAsyncApiController.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/controller/ActuatorAsyncApiController.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.controller; +package io.github.springwolf.core.controller; import com.fasterxml.jackson.core.JsonProcessingException; import io.github.springwolf.asyncapi.v3.jackson.AsyncApiSerializerService; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/controller/AsyncApiController.java b/springwolf-core/src/main/java/io/github/springwolf/core/controller/AsyncApiController.java similarity index 96% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/controller/AsyncApiController.java rename to springwolf-core/src/main/java/io/github/springwolf/core/controller/AsyncApiController.java index 422e13988..66e8ab515 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/controller/AsyncApiController.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/controller/AsyncApiController.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.controller; +package io.github.springwolf.core.controller; import com.fasterxml.jackson.core.JsonProcessingException; import io.github.springwolf.asyncapi.v3.jackson.AsyncApiSerializerService; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/controller/PublishingBaseController.java b/springwolf-core/src/main/java/io/github/springwolf/core/controller/PublishingBaseController.java similarity index 93% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/controller/PublishingBaseController.java rename to springwolf-core/src/main/java/io/github/springwolf/core/controller/PublishingBaseController.java index 794ded651..6cddacbbe 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/controller/PublishingBaseController.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/controller/PublishingBaseController.java @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.controller; +package io.github.springwolf.core.controller; -import io.github.springwolf.core.asyncapi.controller.dtos.MessageDto; +import io.github.springwolf.core.controller.dtos.MessageDto; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.InitializingBean; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/controller/PublishingPayloadCreator.java b/springwolf-core/src/main/java/io/github/springwolf/core/controller/PublishingPayloadCreator.java similarity index 92% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/controller/PublishingPayloadCreator.java rename to springwolf-core/src/main/java/io/github/springwolf/core/controller/PublishingPayloadCreator.java index 2a67767b8..8f9e6d916 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/controller/PublishingPayloadCreator.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/controller/PublishingPayloadCreator.java @@ -1,10 +1,10 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.controller; +package io.github.springwolf.core.controller; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import io.github.springwolf.core.asyncapi.controller.dtos.MessageDto; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.controller.dtos.MessageDto; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/controller/dtos/MessageDto.java b/springwolf-core/src/main/java/io/github/springwolf/core/controller/dtos/MessageDto.java similarity index 88% rename from springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/controller/dtos/MessageDto.java rename to springwolf-core/src/main/java/io/github/springwolf/core/controller/dtos/MessageDto.java index 3c040be3f..2875781be 100644 --- a/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/controller/dtos/MessageDto.java +++ b/springwolf-core/src/main/java/io/github/springwolf/core/controller/dtos/MessageDto.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.controller.dtos; +package io.github.springwolf.core.controller.dtos; import lombok.Builder; import lombok.Data; diff --git a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/PropertyExample.java b/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/PropertyExample.java deleted file mode 100644 index 3cb3b9c60..000000000 --- a/springwolf-core/src/main/java/io/github/springwolf/core/schemas/example/PropertyExample.java +++ /dev/null @@ -1,4 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.example; - -record PropertyExample(String name, T example) {} diff --git a/springwolf-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/springwolf-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index ba0b35b5f..b423e33e4 100644 --- a/springwolf-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/springwolf-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -io.github.springwolf.core.SpringwolfAutoConfiguration +io.github.springwolf.core.configuration.SpringwolfAutoConfiguration diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/ClasspathUtil.java b/springwolf-core/src/test/java/io/github/springwolf/core/ClasspathUtil.java deleted file mode 100644 index 5151c2da0..000000000 --- a/springwolf-core/src/test/java/io/github/springwolf/core/ClasspathUtil.java +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import io.github.springwolf.asyncapi.v3.jackson.DefaultAsyncApiSerializer; - -import java.io.IOException; -import java.io.InputStream; -import java.nio.charset.StandardCharsets; - -public final class ClasspathUtil { - private ClasspathUtil() {} - - public static String readAsString(String resourceName) throws IOException { - InputStream inputStream = ClasspathUtil.class.getResourceAsStream(resourceName); - return new String(inputStream.readAllBytes(), StandardCharsets.UTF_8); - } - - public static JsonNode parseYamlFile(String resourceName) throws IOException { - InputStream inputStream = ClasspathUtil.class.getResourceAsStream(resourceName); - ObjectMapper objectMapper = new DefaultAsyncApiSerializer().getYamlObjectMapper(); - return objectMapper.readTree(inputStream); - } -} diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/DefaultAsyncApiServiceIntegrationTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/DefaultAsyncApiServiceIntegrationTest.java index d843eadc2..cf71be793 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/DefaultAsyncApiServiceIntegrationTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/DefaultAsyncApiServiceIntegrationTest.java @@ -7,9 +7,11 @@ import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.github.springwolf.asyncapi.v3.model.info.Info; import io.github.springwolf.asyncapi.v3.model.server.Server; -import io.github.springwolf.core.configuration.DefaultAsyncApiDocketService; +import io.github.springwolf.core.asyncapi.channels.ChannelsService; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.operations.OperationsService; +import io.github.springwolf.core.configuration.docket.DefaultAsyncApiDocketService; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; -import io.github.springwolf.core.schemas.ComponentsService; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/DefaultAsyncApiServiceTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/DefaultAsyncApiServiceTest.java index ed7d48a57..18835b3f0 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/DefaultAsyncApiServiceTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/DefaultAsyncApiServiceTest.java @@ -2,10 +2,12 @@ package io.github.springwolf.core.asyncapi; import io.github.springwolf.asyncapi.v3.model.AsyncAPI; -import io.github.springwolf.core.configuration.AsyncApiDocket; -import io.github.springwolf.core.configuration.AsyncApiDocketService; +import io.github.springwolf.core.asyncapi.channels.ChannelsService; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.operations.OperationsService; +import io.github.springwolf.core.configuration.docket.AsyncApiDocket; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; import io.github.springwolf.core.fixtures.AsyncApiDocketFixture; -import io.github.springwolf.core.schemas.ComponentsService; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/DefaultChannelsServiceIntegrationTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/channels/DefaultChannelsServiceIntegrationTest.java similarity index 96% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/DefaultChannelsServiceIntegrationTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/channels/DefaultChannelsServiceIntegrationTest.java index ae993b314..ef3b35250 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/DefaultChannelsServiceIntegrationTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/channels/DefaultChannelsServiceIntegrationTest.java @@ -1,12 +1,12 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi; +package io.github.springwolf.core.asyncapi.channels; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import io.github.springwolf.asyncapi.v3.model.channel.ChannelReference; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.github.springwolf.asyncapi.v3.model.operation.Operation; import io.github.springwolf.asyncapi.v3.model.operation.OperationAction; -import io.github.springwolf.core.asyncapi.scanners.channels.ChannelsScanner; +import io.github.springwolf.core.asyncapi.scanners.ChannelsScanner; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/DefaultComponentsServiceTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/DefaultComponentsServiceTest.java similarity index 97% rename from springwolf-core/src/test/java/io/github/springwolf/core/schemas/DefaultComponentsServiceTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/DefaultComponentsServiceTest.java index fa5f178df..fabf80975 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/DefaultComponentsServiceTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/DefaultComponentsServiceTest.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas; +package io.github.springwolf.core.asyncapi.components; import com.fasterxml.jackson.core.PrettyPrinter; import com.fasterxml.jackson.core.util.DefaultIndenter; @@ -7,8 +7,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageObject; +import io.github.springwolf.core.asyncapi.components.postprocessors.SchemasPostProcessor; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; -import io.github.springwolf.core.schemas.postprocessor.SchemasPostProcessor; import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/DefaultJsonComponentsServiceTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/DefaultJsonComponentsServiceTest.java similarity index 95% rename from springwolf-core/src/test/java/io/github/springwolf/core/schemas/DefaultJsonComponentsServiceTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/DefaultJsonComponentsServiceTest.java index 8a73a6b95..a830ec680 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/DefaultJsonComponentsServiceTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/DefaultJsonComponentsServiceTest.java @@ -1,17 +1,17 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas; +package io.github.springwolf.core.asyncapi.components; import com.fasterxml.jackson.core.PrettyPrinter; import com.fasterxml.jackson.core.util.DefaultIndenter; import com.fasterxml.jackson.core.util.DefaultPrettyPrinter; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.AsyncApiPayload; +import io.github.springwolf.core.asyncapi.annotations.AsyncApiPayload; +import io.github.springwolf.core.asyncapi.components.examples.SchemaWalkerProvider; +import io.github.springwolf.core.asyncapi.components.examples.walkers.DefaultSchemaWalker; +import io.github.springwolf.core.asyncapi.components.examples.walkers.json.ExampleJsonValueGenerator; +import io.github.springwolf.core.asyncapi.components.postprocessors.ExampleGeneratorPostProcessor; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; -import io.github.springwolf.core.schemas.example.DefaultSchemaWalker; -import io.github.springwolf.core.schemas.example.ExampleJsonValueGenerator; -import io.github.springwolf.core.schemas.example.SchemaWalkerProvider; -import io.github.springwolf.core.schemas.postprocessor.ExampleGeneratorPostProcessor; import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.annotation.Nullable; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/DefaultXmlComponentsServiceTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/DefaultXmlComponentsServiceTest.java similarity index 94% rename from springwolf-core/src/test/java/io/github/springwolf/core/schemas/DefaultXmlComponentsServiceTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/DefaultXmlComponentsServiceTest.java index 899c6d5dc..76db41ed3 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/DefaultXmlComponentsServiceTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/DefaultXmlComponentsServiceTest.java @@ -1,18 +1,18 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas; +package io.github.springwolf.core.asyncapi.components; import com.fasterxml.jackson.core.PrettyPrinter; import com.fasterxml.jackson.core.util.DefaultIndenter; import com.fasterxml.jackson.core.util.DefaultPrettyPrinter; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.AsyncApiPayload; +import io.github.springwolf.core.asyncapi.annotations.AsyncApiPayload; +import io.github.springwolf.core.asyncapi.components.examples.SchemaWalkerProvider; +import io.github.springwolf.core.asyncapi.components.examples.walkers.DefaultSchemaWalker; +import io.github.springwolf.core.asyncapi.components.examples.walkers.xml.DefaultExampleXmlValueSerializer; +import io.github.springwolf.core.asyncapi.components.examples.walkers.xml.ExampleXmlValueGenerator; +import io.github.springwolf.core.asyncapi.components.postprocessors.ExampleGeneratorPostProcessor; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; -import io.github.springwolf.core.schemas.example.DefaultExampleXmlValueSerializer; -import io.github.springwolf.core.schemas.example.DefaultSchemaWalker; -import io.github.springwolf.core.schemas.example.ExampleXmlValueGenerator; -import io.github.springwolf.core.schemas.example.SchemaWalkerProvider; -import io.github.springwolf.core.schemas.postprocessor.ExampleGeneratorPostProcessor; import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.annotation.Nullable; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/DefaultYamlComponentsServiceTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/DefaultYamlComponentsServiceTest.java similarity index 93% rename from springwolf-core/src/test/java/io/github/springwolf/core/schemas/DefaultYamlComponentsServiceTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/DefaultYamlComponentsServiceTest.java index 8cf8a0bb8..5d03a2c43 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/DefaultYamlComponentsServiceTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/DefaultYamlComponentsServiceTest.java @@ -1,19 +1,19 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas; +package io.github.springwolf.core.asyncapi.components; import com.fasterxml.jackson.core.PrettyPrinter; import com.fasterxml.jackson.core.util.DefaultIndenter; import com.fasterxml.jackson.core.util.DefaultPrettyPrinter; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.AsyncApiPayload; +import io.github.springwolf.core.asyncapi.annotations.AsyncApiPayload; +import io.github.springwolf.core.asyncapi.components.examples.SchemaWalkerProvider; +import io.github.springwolf.core.asyncapi.components.examples.walkers.DefaultSchemaWalker; +import io.github.springwolf.core.asyncapi.components.examples.walkers.json.ExampleJsonValueGenerator; +import io.github.springwolf.core.asyncapi.components.examples.walkers.yaml.DefaultExampleYamlValueSerializer; +import io.github.springwolf.core.asyncapi.components.examples.walkers.yaml.ExampleYamlValueGenerator; +import io.github.springwolf.core.asyncapi.components.postprocessors.ExampleGeneratorPostProcessor; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; -import io.github.springwolf.core.schemas.example.DefaultExampleYamlValueSerializer; -import io.github.springwolf.core.schemas.example.DefaultSchemaWalker; -import io.github.springwolf.core.schemas.example.ExampleJsonValueGenerator; -import io.github.springwolf.core.schemas.example.ExampleYamlValueGenerator; -import io.github.springwolf.core.schemas.example.SchemaWalkerProvider; -import io.github.springwolf.core.schemas.postprocessor.ExampleGeneratorPostProcessor; import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.annotation.Nullable; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/SwaggerSchemaUtilTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/SwaggerSchemaUtilTest.java similarity index 99% rename from springwolf-core/src/test/java/io/github/springwolf/core/schemas/SwaggerSchemaUtilTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/SwaggerSchemaUtilTest.java index 06d6f4b07..831dffda7 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/SwaggerSchemaUtilTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/SwaggerSchemaUtilTest.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas; +package io.github.springwolf.core.asyncapi.components; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.github.springwolf.asyncapi.v3.model.components.ComponentSchema; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/example/SchemaWalkerProviderTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/examples/walkers/SchemaWalkerProviderTest.java similarity index 90% rename from springwolf-core/src/test/java/io/github/springwolf/core/schemas/example/SchemaWalkerProviderTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/examples/walkers/SchemaWalkerProviderTest.java index 580470c70..637c0aa7a 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/example/SchemaWalkerProviderTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/examples/walkers/SchemaWalkerProviderTest.java @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.example; +package io.github.springwolf.core.asyncapi.components.examples.walkers; +import io.github.springwolf.core.asyncapi.components.examples.SchemaWalkerProvider; import org.junit.jupiter.api.Test; import java.util.List; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/postprocessor/AvroSchemaPostProcessorTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/postprocessors/AvroSchemaPostProcessorTest.java similarity index 98% rename from springwolf-core/src/test/java/io/github/springwolf/core/schemas/postprocessor/AvroSchemaPostProcessorTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/postprocessors/AvroSchemaPostProcessorTest.java index 9d9d8c635..c294109a5 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/postprocessor/AvroSchemaPostProcessorTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/components/postprocessors/AvroSchemaPostProcessorTest.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.postprocessor; +package io.github.springwolf.core.asyncapi.components.postprocessors; import io.swagger.v3.oas.models.media.StringSchema; import org.junit.jupiter.api.Test; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/controller/SpringContextControllerIntegrationTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/controller/SpringContextControllerIntegrationTest.java index baa75e30c..dd3cf156a 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/controller/SpringContextControllerIntegrationTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/controller/SpringContextControllerIntegrationTest.java @@ -2,7 +2,9 @@ package io.github.springwolf.core.asyncapi.controller; import com.fasterxml.jackson.core.JsonProcessingException; -import io.github.springwolf.core.SpringwolfWebConfiguration; +import io.github.springwolf.core.configuration.SpringwolfWebConfiguration; +import io.github.springwolf.core.controller.ActuatorAsyncApiController; +import io.github.springwolf.core.controller.AsyncApiController; import io.github.springwolf.core.fixtures.MinimalIntegrationTestContextConfiguration; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/controller/dtos/MessageDtoDeserializationTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/controller/dtos/MessageDtoDeserializationTest.java index 68f478a19..89cf725d2 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/controller/dtos/MessageDtoDeserializationTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/controller/dtos/MessageDtoDeserializationTest.java @@ -2,6 +2,7 @@ package io.github.springwolf.core.asyncapi.controller.dtos; import com.fasterxml.jackson.databind.ObjectMapper; +import io.github.springwolf.core.controller.dtos.MessageDto; import io.swagger.v3.core.util.Json; import org.junit.jupiter.api.Test; @@ -27,6 +28,6 @@ void testCanBeSerialized() throws IOException, ClassNotFoundException { assertThat(value.getPayload()) .isEqualTo( new ObjectMapper().writeValueAsString(singletonMap("some-payload-key", "some-payload-value"))); - assertThat(value.getPayloadType()).isEqualTo("io.github.springwolf.core.asyncapi.controller.dtos.MessageDto"); + assertThat(value.getPayloadType()).isEqualTo("io.github.springwolf.core.controller.dtos.MessageDto"); } } diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/DefaultOperationsServiceIntegrationTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/oprtations/DefaultOperationsServiceIntegrationTest.java similarity index 93% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/DefaultOperationsServiceIntegrationTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/oprtations/DefaultOperationsServiceIntegrationTest.java index edda98593..a376152d0 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/DefaultOperationsServiceIntegrationTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/oprtations/DefaultOperationsServiceIntegrationTest.java @@ -1,10 +1,11 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi; +package io.github.springwolf.core.asyncapi.oprtations; import io.github.springwolf.asyncapi.v3.model.channel.ChannelReference; import io.github.springwolf.asyncapi.v3.model.operation.Operation; import io.github.springwolf.asyncapi.v3.model.operation.OperationAction; -import io.github.springwolf.core.asyncapi.scanners.channels.OperationsScanner; +import io.github.springwolf.core.asyncapi.operations.DefaultOperationsService; +import io.github.springwolf.core.asyncapi.scanners.OperationsScanner; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/beans/DefaultBeanMethodsScannerIntegrationTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/beans/DefaultBeanMethodsScannerIntegrationTest.java index 53d2adce2..e8f692ace 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/beans/DefaultBeanMethodsScannerIntegrationTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/beans/DefaultBeanMethodsScannerIntegrationTest.java @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.core.asyncapi.scanners.beans; -import io.github.springwolf.core.asyncapi.scanners.classes.ConfigurationClassScanner; +import io.github.springwolf.core.asyncapi.scanners.classes.spring.ConfigurationClassScanner; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/bindings/processor/TestAbstractOperationBindingProcessor.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/bindings/processor/TestAbstractOperationBindingProcessor.java index 58a2fb541..b6fc03142 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/bindings/processor/TestAbstractOperationBindingProcessor.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/bindings/processor/TestAbstractOperationBindingProcessor.java @@ -2,9 +2,10 @@ package io.github.springwolf.core.asyncapi.scanners.bindings.processor; import io.github.springwolf.asyncapi.v3.bindings.OperationBinding; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperationBinding; import io.github.springwolf.core.asyncapi.scanners.bindings.BindingProcessorPriority; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.AsyncOperationBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.AbstractOperationBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.ProcessedOperationBinding; import org.springframework.core.annotation.Order; import java.lang.annotation.ElementType; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/bindings/processor/TestMessageBindingProcessor.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/bindings/processor/TestMessageBindingProcessor.java index 0ff95d509..1b5496194 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/bindings/processor/TestMessageBindingProcessor.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/bindings/processor/TestMessageBindingProcessor.java @@ -1,11 +1,11 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.core.asyncapi.scanners.bindings.processor; +import io.github.springwolf.asyncapi.v3.bindings.EmptyMessageBinding; import io.github.springwolf.asyncapi.v3.bindings.MessageBinding; import io.github.springwolf.core.asyncapi.scanners.bindings.BindingProcessorPriority; -import io.github.springwolf.core.asyncapi.scanners.bindings.MessageBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedMessageBinding; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.bindings.EmptyMessageBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.MessageBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.ProcessedMessageBinding; import org.springframework.core.annotation.Order; import java.lang.annotation.ElementType; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/bindings/processor/TestOperationBindingProcessor.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/bindings/processor/TestOperationBindingProcessor.java index a6fc8bebd..cadf19178 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/bindings/processor/TestOperationBindingProcessor.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/bindings/processor/TestOperationBindingProcessor.java @@ -3,8 +3,8 @@ import io.github.springwolf.asyncapi.v3.bindings.OperationBinding; import io.github.springwolf.core.asyncapi.scanners.bindings.BindingProcessorPriority; -import io.github.springwolf.core.asyncapi.scanners.bindings.OperationBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedOperationBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.OperationBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.ProcessedOperationBinding; import org.springframework.core.annotation.Order; import java.lang.annotation.ElementType; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/ChannelMergerTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/ChannelMergerTest.java index b96162730..0ad143b35 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/ChannelMergerTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/ChannelMergerTest.java @@ -4,7 +4,7 @@ import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageObject; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; -import io.github.springwolf.core.asyncapi.MessageHelper; +import io.github.springwolf.core.asyncapi.scanners.common.MessageHelper; import org.junit.jupiter.api.Test; import java.util.Arrays; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/SimpleChannelsScannerTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/SpringAnnotationChannelsScannerTest.java similarity index 62% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/SimpleChannelsScannerTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/SpringAnnotationChannelsScannerTest.java index 4680d4bbf..87c5ceee0 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/SimpleChannelsScannerTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/SpringAnnotationChannelsScannerTest.java @@ -2,6 +2,7 @@ package io.github.springwolf.core.asyncapi.scanners.channels; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; +import io.github.springwolf.core.asyncapi.scanners.channels.annotations.SpringAnnotationChannelsScannerDelegator; import io.github.springwolf.core.asyncapi.scanners.classes.ClassScanner; import org.junit.jupiter.api.Test; @@ -14,18 +15,19 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -class SimpleChannelsScannerTest { +class SpringAnnotationChannelsScannerTest { private final ClassScanner classScanner = mock(ClassScanner.class); - private final SimpleChannelsScanner.ClassProcessor classProcessor = - mock(SimpleChannelsScanner.ClassProcessor.class); + private final SpringAnnotationChannelsScannerDelegator springAnnotationChannelsScannerDelegator = + mock(SpringAnnotationChannelsScannerDelegator.class); - private final SimpleChannelsScanner simpleChannelsScanner = new SimpleChannelsScanner(classScanner, classProcessor); + private final SpringAnnotationChannelsScanner springAnnotationChannelsScanner = + new SpringAnnotationChannelsScanner(classScanner, springAnnotationChannelsScannerDelegator); @Test void noClassFoundTest() { // when - Map channels = simpleChannelsScanner.scan(); + Map channels = springAnnotationChannelsScanner.scan(); // then assertThat(channels).isEmpty(); @@ -39,10 +41,10 @@ void processClassTest() { Map.entry("channel1", ChannelObject.builder().build()); Map.Entry channel2 = Map.entry("channel2", ChannelObject.builder().build()); - when(classProcessor.process(any())).thenReturn(Stream.of(channel1, channel2)); + when(springAnnotationChannelsScannerDelegator.scan(any())).thenReturn(Stream.of(channel1, channel2)); // when - Map channels = simpleChannelsScanner.scan(); + Map channels = springAnnotationChannelsScanner.scan(); // then assertThat(channels).containsExactly(channel1, channel2); @@ -56,10 +58,10 @@ void sameChannelsAreMergedTest() { Map.entry("channel1", ChannelObject.builder().build()); Map.Entry channel2 = Map.entry("channel1", ChannelObject.builder().build()); - when(classProcessor.process(any())).thenReturn(Stream.of(channel1, channel2)); + when(springAnnotationChannelsScannerDelegator.scan(any())).thenReturn(Stream.of(channel1, channel2)); // when - Map channels = simpleChannelsScanner.scan(); + Map channels = springAnnotationChannelsScanner.scan(); // then assertThat(channels) @@ -70,10 +72,10 @@ void sameChannelsAreMergedTest() { void processEmptyClassTest() { // given when(classScanner.scan()).thenReturn(Set.of(String.class)); - when(classProcessor.process(any())).thenReturn(Stream.of()); + when(springAnnotationChannelsScannerDelegator.scan(any())).thenReturn(Stream.of()); // when - Map channels = simpleChannelsScanner.scan(); + Map channels = springAnnotationChannelsScanner.scan(); // then assertThat(channels).isEmpty(); diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationChannelsScannerTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/AsyncAnnotationChannelsScannerTest.java similarity index 95% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationChannelsScannerTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/AsyncAnnotationChannelsScannerTest.java index c689825c7..4694bd037 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationChannelsScannerTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/AsyncAnnotationChannelsScannerTest.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.channels.annotations; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import io.github.springwolf.asyncapi.v3.model.channel.ChannelReference; @@ -14,21 +14,23 @@ import io.github.springwolf.asyncapi.v3.model.schema.MultiFormatSchema; import io.github.springwolf.asyncapi.v3.model.schema.SchemaReference; import io.github.springwolf.asyncapi.v3.model.server.Server; -import io.github.springwolf.core.asyncapi.scanners.bindings.MessageBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.bindings.OperationBindingProcessor; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncMessage; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.components.DefaultComponentsService; +import io.github.springwolf.core.asyncapi.components.SwaggerSchemaUtil; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaders; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.MessageBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.OperationBindingProcessor; import io.github.springwolf.core.asyncapi.scanners.bindings.processor.TestOperationBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncMessage; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.channels.AsyncAnnotationChannelsScanner; import io.github.springwolf.core.asyncapi.scanners.classes.ClassScanner; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaders; -import io.github.springwolf.core.configuration.AsyncApiDocket; -import io.github.springwolf.core.configuration.AsyncApiDocketService; +import io.github.springwolf.core.asyncapi.scanners.common.AsyncAnnotationScanner; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.configuration.docket.AsyncApiDocket; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; -import io.github.springwolf.core.schemas.ComponentsService; -import io.github.springwolf.core.schemas.DefaultComponentsService; -import io.github.springwolf.core.schemas.SwaggerSchemaUtil; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/ClassLevelAnnotationChannelsScannerIntegrationTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationClassLevelChannelsScannerIntegrationTest.java similarity index 88% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/ClassLevelAnnotationChannelsScannerIntegrationTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationClassLevelChannelsScannerIntegrationTest.java index a29ea7b00..0de5cef6f 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/ClassLevelAnnotationChannelsScannerIntegrationTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationClassLevelChannelsScannerIntegrationTest.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.channels.annotations; import io.github.springwolf.asyncapi.v3.bindings.ChannelBinding; import io.github.springwolf.asyncapi.v3.bindings.MessageBinding; @@ -11,16 +11,16 @@ import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.github.springwolf.asyncapi.v3.model.schema.MultiFormatSchema; import io.github.springwolf.asyncapi.v3.model.schema.SchemaReference; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.components.DefaultComponentsService; +import io.github.springwolf.core.asyncapi.components.SwaggerSchemaUtil; +import io.github.springwolf.core.asyncapi.components.examples.SchemaWalkerProvider; +import io.github.springwolf.core.asyncapi.components.examples.walkers.DefaultSchemaWalker; +import io.github.springwolf.core.asyncapi.components.examples.walkers.json.ExampleJsonValueGenerator; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeadersNotDocumented; import io.github.springwolf.core.asyncapi.scanners.bindings.BindingFactory; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeadersNotDocumented; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; -import io.github.springwolf.core.schemas.ComponentsService; -import io.github.springwolf.core.schemas.DefaultComponentsService; -import io.github.springwolf.core.schemas.SwaggerSchemaUtil; -import io.github.springwolf.core.schemas.example.DefaultSchemaWalker; -import io.github.springwolf.core.schemas.example.ExampleJsonValueGenerator; -import io.github.springwolf.core.schemas.example.SchemaWalkerProvider; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; @@ -45,7 +45,7 @@ @ExtendWith(SpringExtension.class) @ContextConfiguration( classes = { - ClassLevelAnnotationChannelsScannerIntegrationTest.TestBindingFactory.class, + SpringAnnotationClassLevelChannelsScannerIntegrationTest.TestBindingFactory.class, DefaultComponentsService.class, SwaggerSchemaUtil.class, PayloadClassExtractor.class, @@ -54,7 +54,7 @@ ExampleJsonValueGenerator.class, SpringwolfConfigProperties.class, }) -class ClassLevelAnnotationChannelsScannerIntegrationTest { +class SpringAnnotationClassLevelChannelsScannerIntegrationTest { @Autowired BindingFactory bindingFactory; @@ -65,11 +65,11 @@ class ClassLevelAnnotationChannelsScannerIntegrationTest { @Autowired ComponentsService componentsService; - private ClassLevelAnnotationChannelsScanner scanner; + private SpringAnnotationClassLevelChannelsScanner scanner; @BeforeEach void setUp() { - scanner = new ClassLevelAnnotationChannelsScanner<>( + scanner = new SpringAnnotationClassLevelChannelsScanner<>( TestClassListener.class, TestMethodListener.class, this.bindingFactory, @@ -84,7 +84,7 @@ class NoClassListener { void scan_componentHasNoClassLevelRabbitListenerAnnotation() { // when List> channels = - scanner.process(ClassWithoutClassListener.class).toList(); + scanner.scan(ClassWithoutClassListener.class).toList(); // then assertThat(channels).isEmpty(); @@ -103,7 +103,7 @@ class NoMethodListener { void scan_componentHasNoClassLevelRabbitListenerAnnotation() { // when List> channels = - scanner.process(ClassWithoutMethodListener.class).toList(); + scanner.scan(ClassWithoutMethodListener.class).toList(); // then assertThat(channels).isEmpty(); @@ -122,7 +122,7 @@ class OneMethodLevelAnnotation { void scan_componentWithOneMethodLevelAnnotation() { // when List> actualChannels = - scanner.process(ClassWithOneMethodLevelHandler.class).toList(); + scanner.scan(ClassWithOneMethodLevelHandler.class).toList(); // then MessagePayload payload = MessagePayload.of(MultiFormatSchema.builder() @@ -164,7 +164,7 @@ class MultipleMethodLevelAnnotations { void scan_componentWithMultipleRabbitHandlerMethods() { // when List> actualChannels = - scanner.process(ClassWithMultipleMethodLevelHandlers.class).toList(); + scanner.scan(ClassWithMultipleMethodLevelHandlers.class).toList(); // Then the returned collection contains the channel with message set to oneOf MessagePayload simpleFooPayload = MessagePayload.of(MultiFormatSchema.builder() diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/ClassLevelAnnotationChannelsScannerTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationClassLevelChannelsScannerTest.java similarity index 88% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/ClassLevelAnnotationChannelsScannerTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationClassLevelChannelsScannerTest.java index ea85da9c9..0a0069220 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/ClassLevelAnnotationChannelsScannerTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationClassLevelChannelsScannerTest.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.channels.annotations; import io.github.springwolf.asyncapi.v3.bindings.ChannelBinding; import io.github.springwolf.asyncapi.v3.bindings.MessageBinding; @@ -14,11 +14,11 @@ import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.github.springwolf.asyncapi.v3.model.schema.MultiFormatSchema; import io.github.springwolf.asyncapi.v3.model.schema.SchemaReference; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaders; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeadersNotDocumented; import io.github.springwolf.core.asyncapi.scanners.bindings.BindingFactory; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaders; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeadersNotDocumented; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; import lombok.Data; import lombok.NoArgsConstructor; import org.junit.jupiter.api.BeforeEach; @@ -36,13 +36,13 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -class ClassLevelAnnotationChannelsScannerTest { +class SpringAnnotationClassLevelChannelsScannerTest { private final PayloadClassExtractor payloadClassExtractor = mock(PayloadClassExtractor.class); private final BindingFactory bindingFactory = mock(BindingFactory.class); private final ComponentsService componentsService = mock(ComponentsService.class); - ClassLevelAnnotationChannelsScanner scanner = - new ClassLevelAnnotationChannelsScanner<>( + SpringAnnotationClassLevelChannelsScanner scanner = + new SpringAnnotationClassLevelChannelsScanner<>( TestClassListener.class, TestMethodListener.class, bindingFactory, @@ -80,7 +80,7 @@ void setUp() { void scan_componentHasTestListenerMethods() { // when List> channels = - scanner.process(ClassWithTestListenerAnnotation.class).toList(); + scanner.scan(ClassWithTestListenerAnnotation.class).toList(); // then MessagePayload payload = MessagePayload.of(MultiFormatSchema.builder() diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/MethodLevelAnnotationChannelsScannerIntegrationTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationMethodLevelChannelsScannerIntegrationTest.java similarity index 88% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/MethodLevelAnnotationChannelsScannerIntegrationTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationMethodLevelChannelsScannerIntegrationTest.java index 8964a6148..daa1932c1 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/MethodLevelAnnotationChannelsScannerIntegrationTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationMethodLevelChannelsScannerIntegrationTest.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.channels.annotations; import io.github.springwolf.asyncapi.v3.bindings.ChannelBinding; import io.github.springwolf.asyncapi.v3.bindings.MessageBinding; @@ -11,16 +11,16 @@ import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.github.springwolf.asyncapi.v3.model.schema.MultiFormatSchema; import io.github.springwolf.asyncapi.v3.model.schema.SchemaReference; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.components.DefaultComponentsService; +import io.github.springwolf.core.asyncapi.components.SwaggerSchemaUtil; +import io.github.springwolf.core.asyncapi.components.examples.SchemaWalkerProvider; +import io.github.springwolf.core.asyncapi.components.examples.walkers.DefaultSchemaWalker; +import io.github.springwolf.core.asyncapi.components.examples.walkers.json.ExampleJsonValueGenerator; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaders; import io.github.springwolf.core.asyncapi.scanners.bindings.BindingFactory; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaders; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; -import io.github.springwolf.core.schemas.ComponentsService; -import io.github.springwolf.core.schemas.DefaultComponentsService; -import io.github.springwolf.core.schemas.SwaggerSchemaUtil; -import io.github.springwolf.core.schemas.example.DefaultSchemaWalker; -import io.github.springwolf.core.schemas.example.ExampleJsonValueGenerator; -import io.github.springwolf.core.schemas.example.SchemaWalkerProvider; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; @@ -40,14 +40,14 @@ import java.util.List; import java.util.Map; -import static io.github.springwolf.core.asyncapi.scanners.channels.annotation.MethodLevelAnnotationChannelsScannerIntegrationTest.TestBindingFactory.defaultChannelBinding; -import static io.github.springwolf.core.asyncapi.scanners.channels.annotation.MethodLevelAnnotationChannelsScannerIntegrationTest.TestBindingFactory.defaultMessageBinding; +import static io.github.springwolf.core.asyncapi.scanners.channels.annotations.SpringAnnotationMethodLevelChannelsScannerIntegrationTest.TestBindingFactory.defaultChannelBinding; +import static io.github.springwolf.core.asyncapi.scanners.channels.annotations.SpringAnnotationMethodLevelChannelsScannerIntegrationTest.TestBindingFactory.defaultMessageBinding; import static org.assertj.core.api.Assertions.assertThat; @ExtendWith(SpringExtension.class) @ContextConfiguration( classes = { - MethodLevelAnnotationChannelsScannerIntegrationTest.TestBindingFactory.class, + SpringAnnotationMethodLevelChannelsScannerIntegrationTest.TestBindingFactory.class, DefaultComponentsService.class, SwaggerSchemaUtil.class, PayloadClassExtractor.class, @@ -56,7 +56,7 @@ ExampleJsonValueGenerator.class, SpringwolfConfigProperties.class, }) -class MethodLevelAnnotationChannelsScannerIntegrationTest { +class SpringAnnotationMethodLevelChannelsScannerIntegrationTest { @Autowired BindingFactory bindingFactory; @@ -66,11 +66,11 @@ class MethodLevelAnnotationChannelsScannerIntegrationTest { @Autowired ComponentsService componentsService; - private MethodLevelAnnotationChannelsScanner scanner; + private SpringAnnotationMethodLevelChannelsScanner scanner; @BeforeEach void setUp() { - scanner = new MethodLevelAnnotationChannelsScanner<>( + scanner = new SpringAnnotationMethodLevelChannelsScanner<>( TestChannelListener.class, this.bindingFactory, payloadClassExtractor, componentsService); } @@ -80,7 +80,7 @@ class NoListener { void scan_componentHasNoListenerMethods() { // when List> channels = - scanner.process(ClassWithoutListenerAnnotation.class).toList(); + scanner.scan(ClassWithoutListenerAnnotation.class).toList(); // then assertThat(channels).isEmpty(); @@ -97,7 +97,7 @@ class WithListener { void scan_componentHasListenerMethod() { // when List> actualChannels = - scanner.process(ClassWithListenerAnnotation.class).toList(); + scanner.scan(ClassWithListenerAnnotation.class).toList(); // then MessagePayload payload = MessagePayload.of(MultiFormatSchema.builder() @@ -135,7 +135,7 @@ class OneChannelTwoPayloads { @Test void scan_componentHasTestListenerMethods_multiplePayloads() { // when - List> channels = scanner.process( + List> channels = scanner.scan( ClassWithTestListenerAnnotationMultiplePayloads.class) .toList(); @@ -197,7 +197,7 @@ class MetaAnnotation { void scan_componentHasListenerMetaMethod() { // when List> actualChannels = - scanner.process(ClassWithListenerMetaAnnotation.class).toList(); + scanner.scan(ClassWithListenerMetaAnnotation.class).toList(); // then MessagePayload payload = MessagePayload.of(MultiFormatSchema.builder() diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/MethodLevelAnnotationChannelsScannerTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationMethodLevelChannelsScannerTest.java similarity index 91% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/MethodLevelAnnotationChannelsScannerTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationMethodLevelChannelsScannerTest.java index f27cbfb25..924e5d0b3 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/MethodLevelAnnotationChannelsScannerTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotations/SpringAnnotationMethodLevelChannelsScannerTest.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.channels.annotations; import io.github.springwolf.asyncapi.v3.bindings.ChannelBinding; import io.github.springwolf.asyncapi.v3.bindings.MessageBinding; @@ -14,11 +14,11 @@ import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.github.springwolf.asyncapi.v3.model.schema.MultiFormatSchema; import io.github.springwolf.asyncapi.v3.model.schema.SchemaReference; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaders; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeadersNotDocumented; import io.github.springwolf.core.asyncapi.scanners.bindings.BindingFactory; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaders; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeadersNotDocumented; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; import lombok.Data; import lombok.NoArgsConstructor; import org.junit.jupiter.api.BeforeEach; @@ -37,12 +37,12 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -class MethodLevelAnnotationChannelsScannerTest { +class SpringAnnotationMethodLevelChannelsScannerTest { private final PayloadClassExtractor payloadClassExtractor = mock(PayloadClassExtractor.class); private final BindingFactory bindingFactory = mock(BindingFactory.class); private final ComponentsService componentsService = mock(ComponentsService.class); - MethodLevelAnnotationChannelsScanner scanner = new MethodLevelAnnotationChannelsScanner<>( + SpringAnnotationMethodLevelChannelsScanner scanner = new SpringAnnotationMethodLevelChannelsScanner<>( TestListener.class, bindingFactory, payloadClassExtractor, componentsService); private static final String CHANNEL = "test-channel"; @@ -82,7 +82,7 @@ void setUp() throws NoSuchMethodException { void scan_componentHasTestListenerMethods() { // when List> channels = - scanner.process(ClassWithTestListenerAnnotation.class).collect(Collectors.toList()); + scanner.scan(ClassWithTestListenerAnnotation.class).collect(Collectors.toList()); // then MessagePayload payload = MessagePayload.of(MultiFormatSchema.builder() @@ -119,7 +119,7 @@ private void methodWithoutAnnotation() {} void scan_componentHasMultipleTestListenerMethods() { // when List> channels = - scanner.process(ClassWithMultipleTestListenerAnnotation.class).toList(); + scanner.scan(ClassWithMultipleTestListenerAnnotation.class).toList(); // then MessagePayload stringPayload = MessagePayload.of(MultiFormatSchema.builder() diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/classes/SpringwolfClassScannerIntegrationTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/classes/SpringwolfClassScannerIntegrationTest.java index 6be3897cb..1d483b346 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/classes/SpringwolfClassScannerIntegrationTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/classes/SpringwolfClassScannerIntegrationTest.java @@ -3,8 +3,10 @@ import io.github.springwolf.asyncapi.v3.model.info.Info; import io.github.springwolf.core.asyncapi.scanners.beans.DefaultBeanMethodsScanner; -import io.github.springwolf.core.configuration.AsyncApiDocket; -import io.github.springwolf.core.configuration.AsyncApiDocketService; +import io.github.springwolf.core.asyncapi.scanners.classes.spring.ComponentClassScanner; +import io.github.springwolf.core.asyncapi.scanners.classes.spring.ConfigurationClassScanner; +import io.github.springwolf.core.configuration.docket.AsyncApiDocket; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/classes/ComponentClassScannerIntegrationTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/classes/spring/ComponentClassScannerIntegrationTest.java similarity index 81% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/classes/ComponentClassScannerIntegrationTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/classes/spring/ComponentClassScannerIntegrationTest.java index a27a49673..f478f9a9a 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/classes/ComponentClassScannerIntegrationTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/classes/spring/ComponentClassScannerIntegrationTest.java @@ -1,9 +1,13 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.classes; +package io.github.springwolf.core.asyncapi.scanners.classes.spring; import io.github.springwolf.asyncapi.v3.model.info.Info; -import io.github.springwolf.core.configuration.AsyncApiDocket; -import io.github.springwolf.core.configuration.AsyncApiDocketService; +import io.github.springwolf.core.asyncapi.scanners.classes.TestBeanConfiguration; +import io.github.springwolf.core.asyncapi.scanners.classes.TestComponent; +import io.github.springwolf.core.asyncapi.scanners.classes.TestConditionalComponent; +import io.github.springwolf.core.asyncapi.scanners.classes.TestOtherConditionalComponent; +import io.github.springwolf.core.configuration.docket.AsyncApiDocket; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -47,7 +51,7 @@ void setUp() { .title("ComponentClassScannerTest-title") .version("ComponentClassScannerTest-version") .build()) - .basePackage(this.getClass().getPackage().getName()) + .basePackage("io.github.springwolf.core.asyncapi.scanners.classes") .build()); } diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/classes/ConfigurationClassScannerIntegrationTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/classes/spring/ConfigurationClassScannerIntegrationTest.java similarity index 79% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/classes/ConfigurationClassScannerIntegrationTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/classes/spring/ConfigurationClassScannerIntegrationTest.java index 29545ae13..37428c7a2 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/classes/ConfigurationClassScannerIntegrationTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/classes/spring/ConfigurationClassScannerIntegrationTest.java @@ -1,9 +1,10 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.classes; +package io.github.springwolf.core.asyncapi.scanners.classes.spring; import io.github.springwolf.asyncapi.v3.model.info.Info; -import io.github.springwolf.core.configuration.AsyncApiDocket; -import io.github.springwolf.core.configuration.AsyncApiDocketService; +import io.github.springwolf.core.asyncapi.scanners.classes.TestBeanConfiguration; +import io.github.springwolf.core.configuration.docket.AsyncApiDocket; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; @@ -34,7 +35,7 @@ void getComponents() { .title("ConfigurationClassScannerTest-title") .version("ConfigurationClassScannerTest-version") .build()) - .basePackage(this.getClass().getPackage().getName()) + .basePackage("io.github.springwolf.core.asyncapi.scanners.classes") .build()); Set> configurationClasses = configurationClassScanner.scan(); diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/MessageHelperTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/common/MessageHelperTest.java similarity index 95% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/MessageHelperTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/common/MessageHelperTest.java index 447a10dae..97de486f5 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/MessageHelperTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/common/MessageHelperTest.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi; +package io.github.springwolf.core.asyncapi.scanners.common; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageObject; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; @@ -9,8 +9,8 @@ import java.util.Map; import java.util.Set; -import static io.github.springwolf.core.asyncapi.MessageHelper.toMessagesMap; -import static io.github.springwolf.core.asyncapi.MessageHelper.toOperationsMessagesMap; +import static io.github.springwolf.core.asyncapi.scanners.common.MessageHelper.toMessagesMap; +import static io.github.springwolf.core.asyncapi.scanners.common.MessageHelper.toOperationsMessagesMap; import static java.util.Map.entry; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/payload/PayloadClassExtractorTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/common/payload/PayloadClassExtractorTest.java similarity index 98% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/payload/PayloadClassExtractorTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/common/payload/PayloadClassExtractorTest.java index d4864faca..689d60726 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/payload/PayloadClassExtractorTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/common/payload/PayloadClassExtractorTest.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.payload; +package io.github.springwolf.core.asyncapi.scanners.common.payload; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; import org.junit.jupiter.api.Test; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AnnotationUtilTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/common/utils/AnnotationScannerUtilTest.java similarity index 83% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AnnotationUtilTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/common/utils/AnnotationScannerUtilTest.java index e802be925..0ed17371c 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AnnotationUtilTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/common/utils/AnnotationScannerUtilTest.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.common.utils; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; @@ -16,7 +16,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.fail; -class AnnotationUtilTest { +class AnnotationScannerUtilTest { @Nested class FindAnnotationOrThrow { @@ -26,7 +26,7 @@ void findNoAnnotationTest() throws NoSuchMethodException { // when try { - AnnotationUtil.findAnnotationOrThrow(AnnotationUtilTestAnnotation.class, method); + AnnotationScannerUtil.findAnnotationOrThrow(AnnotationUtilTestAnnotation.class, method); fail(); } catch (IllegalArgumentException e) { // then @@ -40,7 +40,7 @@ void findAnnotationTest() throws NoSuchMethodException { // when AnnotationUtilTestAnnotation annotation = - AnnotationUtil.findAnnotationOrThrow(AnnotationUtilTestAnnotation.class, method); + AnnotationScannerUtil.findAnnotationOrThrow(AnnotationUtilTestAnnotation.class, method); // then assertThat(annotation.field()).isEqualTo("value"); @@ -52,7 +52,7 @@ void findAnnotationRepeatedTest() throws NoSuchMethodException { // when AnnotationUtilTestAnnotation annotation = - AnnotationUtil.findAnnotationOrThrow(AnnotationUtilTestAnnotation.class, method); + AnnotationScannerUtil.findAnnotationOrThrow(AnnotationUtilTestAnnotation.class, method); // then assertThat(annotation.field()).isEqualTo("value"); @@ -64,7 +64,7 @@ void findMetaAnnotationTest() throws NoSuchMethodException { // when AnnotationUtilTestAnnotation annotation = - AnnotationUtil.findAnnotationOrThrow(AnnotationUtilTestAnnotation.class, method); + AnnotationScannerUtil.findAnnotationOrThrow(AnnotationUtilTestAnnotation.class, method); // then assertThat(annotation.field()).isEqualTo("metaField"); @@ -79,7 +79,7 @@ void findNoAnnotationTest() throws NoSuchMethodException { // when AnnotationUtilTestAnnotation annotation = - AnnotationUtil.findAnnotation(AnnotationUtilTestAnnotation.class, method); + AnnotationScannerUtil.findAnnotation(AnnotationUtilTestAnnotation.class, method); // then assertThat(annotation).isNull(); @@ -91,7 +91,7 @@ void findAnnotationTest() throws NoSuchMethodException { // when AnnotationUtilTestAnnotation annotation = - AnnotationUtil.findAnnotation(AnnotationUtilTestAnnotation.class, method); + AnnotationScannerUtil.findAnnotation(AnnotationUtilTestAnnotation.class, method); // then assertThat(annotation.field()).isEqualTo("value"); @@ -103,7 +103,7 @@ void findAnnotationRepeatedTest() throws NoSuchMethodException { // when AnnotationUtilTestAnnotation annotation = - AnnotationUtil.findAnnotation(AnnotationUtilTestAnnotation.class, method); + AnnotationScannerUtil.findAnnotation(AnnotationUtilTestAnnotation.class, method); // then assertThat(annotation.field()).isIn("value", "value2"); @@ -115,7 +115,7 @@ void findMetaAnnotationTest() throws NoSuchMethodException { // when AnnotationUtilTestAnnotation annotation = - AnnotationUtil.findAnnotation(AnnotationUtilTestAnnotation.class, method); + AnnotationScannerUtil.findAnnotation(AnnotationUtilTestAnnotation.class, method); // then assertThat(annotation.field()).isEqualTo("metaField"); @@ -130,7 +130,7 @@ void findNoAnnotationTest() throws NoSuchMethodException { // when Set annotation = - AnnotationUtil.findAnnotations(AnnotationUtilTestAnnotation.class, method); + AnnotationScannerUtil.findAnnotations(AnnotationUtilTestAnnotation.class, method); // then assertThat(annotation).isEmpty(); @@ -142,7 +142,7 @@ void findAnnotationTest() throws NoSuchMethodException { // when Set annotation = - AnnotationUtil.findAnnotations(AnnotationUtilTestAnnotation.class, method); + AnnotationScannerUtil.findAnnotations(AnnotationUtilTestAnnotation.class, method); // then assertThat(annotation).hasSize(1); @@ -155,7 +155,7 @@ void findAnnotationRepeatedTest() throws NoSuchMethodException { // when Set annotation = - AnnotationUtil.findAnnotations(AnnotationUtilTestAnnotation.class, method); + AnnotationScannerUtil.findAnnotations(AnnotationUtilTestAnnotation.class, method); // then assertThat(annotation).hasSize(2); @@ -169,7 +169,7 @@ void findMetaAnnotationTest() throws NoSuchMethodException { // when Set annotation = - AnnotationUtil.findAnnotations(AnnotationUtilTestAnnotation.class, method); + AnnotationScannerUtil.findAnnotations(AnnotationUtilTestAnnotation.class, method); // then assertThat(annotation).hasSize(1); diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationScannerUtilTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/common/utils/AsyncAnnotationUtilTest.java similarity index 91% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationScannerUtilTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/common/utils/AsyncAnnotationUtilTest.java index accb9cf0b..5e643a3bf 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationScannerUtilTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/common/utils/AsyncAnnotationUtilTest.java @@ -1,16 +1,16 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.common.utils; import io.github.springwolf.asyncapi.v3.bindings.MessageBinding; import io.github.springwolf.asyncapi.v3.bindings.OperationBinding; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageObject; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncMessage; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaders; import io.github.springwolf.core.asyncapi.scanners.bindings.processor.TestAbstractOperationBindingProcessor; import io.github.springwolf.core.asyncapi.scanners.bindings.processor.TestMessageBindingProcessor; import io.github.springwolf.core.asyncapi.scanners.bindings.processor.TestOperationBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncMessage; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaders; import org.assertj.core.util.Maps; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -29,7 +29,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -class AsyncAnnotationScannerUtilTest { +class AsyncAnnotationUtilTest { @ParameterizedTest @ValueSource(classes = {ClassWithOperationBindingProcessor.class, ClassWithAbstractOperationBindingProcessor.class}) @@ -45,7 +45,7 @@ void getAsyncHeaders(Class classWithOperationBindingProcessor) throws NoSuchM .thenAnswer(invocation -> invocation.getArgument(0).toString() + "Resolved"); // then - AsyncHeaders headers = AsyncAnnotationScannerUtil.getAsyncHeaders(operation, resolver); + AsyncHeaders headers = AsyncAnnotationUtil.getAsyncHeaders(operation, resolver); assertEquals("TestSchema", headers.getSchemaName()); assertTrue(headers.containsKey("headerResolved")); assertEquals("string", headers.get("headerResolved").getType()); @@ -59,7 +59,7 @@ void processOperationBindingFromAnnotation() throws NoSuchMethodException { Method m = ClassWithOperationBindingProcessor.class.getDeclaredMethod("methodWithAnnotation", String.class); // when - Map bindings = AsyncAnnotationScannerUtil.processOperationBindingFromAnnotation( + Map bindings = AsyncAnnotationUtil.processOperationBindingFromAnnotation( m, Collections.singletonList(new TestOperationBindingProcessor())); // then @@ -74,7 +74,7 @@ void processMultipleOperationBindingFromAnnotation() throws NoSuchMethodExceptio "methodWithAnnotation", String.class); // when - Map bindings = AsyncAnnotationScannerUtil.processOperationBindingFromAnnotation( + Map bindings = AsyncAnnotationUtil.processOperationBindingFromAnnotation( m, List.of(new TestOperationBindingProcessor(), new TestAbstractOperationBindingProcessor())); // then @@ -92,7 +92,7 @@ void processMessageBindingFromAnnotation() throws NoSuchMethodException { Method m = ClassWithOperationBindingProcessor.class.getDeclaredMethod("methodWithAnnotation", String.class); // when - Map bindings = AsyncAnnotationScannerUtil.processMessageBindingFromAnnotation( + Map bindings = AsyncAnnotationUtil.processMessageBindingFromAnnotation( m, Collections.singletonList(new TestMessageBindingProcessor())); // then @@ -106,8 +106,8 @@ void processMultipleMessageBindingFromAnnotation() throws NoSuchMethodException "methodWithAnnotation", String.class); // when - Map bindings = AsyncAnnotationScannerUtil.processMessageBindingFromAnnotation( - m, List.of(new TestMessageBindingProcessor())); + Map bindings = + AsyncAnnotationUtil.processMessageBindingFromAnnotation(m, List.of(new TestMessageBindingProcessor())); // then assertEquals(Maps.newHashMap(TestMessageBindingProcessor.TYPE, TestMessageBindingProcessor.BINDING), bindings); @@ -128,7 +128,7 @@ void processMessageFromAnnotationWithoutAsyncMessage(Class classWithOperation // when MessageObject.MessageObjectBuilder actual = MessageObject.builder(); - AsyncAnnotationScannerUtil.processAsyncMessageAnnotation(actual, message, stringResolver); + AsyncAnnotationUtil.processAsyncMessageAnnotation(actual, message, stringResolver); // then var expectedMessage = MessageObject.builder().build(); @@ -151,7 +151,7 @@ void processMessageFromAnnotationWithAsyncMessage(Class classWithOperationBin // when MessageObject.MessageObjectBuilder actual = MessageObject.builder(); - AsyncAnnotationScannerUtil.processAsyncMessageAnnotation(actual, message, stringResolver); + AsyncAnnotationUtil.processAsyncMessageAnnotation(actual, message, stringResolver); // then var expectedMessage = MessageObject.builder() @@ -174,7 +174,7 @@ void getServers() throws NoSuchMethodException { // when when(resolver.resolveStringValue("${test.property.server1}")).thenReturn("server1"); - List servers = AsyncAnnotationScannerUtil.getServers(operation, resolver); + List servers = AsyncAnnotationUtil.getServers(operation, resolver); assertEquals(List.of("server1"), servers); } diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/OperationMergerTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/operations/OperationMergerTest.java similarity index 98% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/OperationMergerTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/operations/OperationMergerTest.java index cd49204a3..d45e897dc 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/OperationMergerTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/operations/OperationMergerTest.java @@ -1,11 +1,12 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels; +package io.github.springwolf.core.asyncapi.scanners.operations; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageObject; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference; import io.github.springwolf.asyncapi.v3.model.operation.Operation; import io.github.springwolf.asyncapi.v3.model.operation.OperationAction; +import io.github.springwolf.core.asyncapi.scanners.channels.ChannelMerger; import org.junit.jupiter.api.Test; import java.util.Arrays; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/SimpleOperationsScannerTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/operations/SpringAnnotationOperationsScannerTest.java similarity index 62% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/SimpleOperationsScannerTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/operations/SpringAnnotationOperationsScannerTest.java index 0f02b129c..0d847397a 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/SimpleOperationsScannerTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/operations/SpringAnnotationOperationsScannerTest.java @@ -1,8 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels; +package io.github.springwolf.core.asyncapi.scanners.operations; import io.github.springwolf.asyncapi.v3.model.operation.Operation; import io.github.springwolf.core.asyncapi.scanners.classes.ClassScanner; +import io.github.springwolf.core.asyncapi.scanners.operations.annotations.SpringAnnotationOperationsScannerDelegator; import org.junit.jupiter.api.Test; import java.util.Map; @@ -14,19 +15,19 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -class SimpleOperationsScannerTest { +class SpringAnnotationOperationsScannerTest { private final ClassScanner classScanner = mock(ClassScanner.class); - private final SimpleOperationsScanner.ClassProcessor classProcessor = - mock(SimpleOperationsScanner.ClassProcessor.class); + private final SpringAnnotationOperationsScannerDelegator classProcessor = + mock(SpringAnnotationOperationsScannerDelegator.class); - private final SimpleOperationsScanner simpleOperationsScanner = - new SimpleOperationsScanner(classScanner, classProcessor); + private final SpringAnnotationOperationsScanner springAnnotationOperationsScanner = + new SpringAnnotationOperationsScanner(classScanner, classProcessor); @Test void noClassFoundTest() { // when - Map operations = simpleOperationsScanner.scan(); + Map operations = springAnnotationOperationsScanner.scan(); // then assertThat(operations).isEmpty(); @@ -40,10 +41,10 @@ void processClassTest() { Map.entry("operation1", Operation.builder().build()); Map.Entry operation2 = Map.entry("operation2", Operation.builder().build()); - when(classProcessor.process(any())).thenReturn(Stream.of(operation1, operation2)); + when(classProcessor.scan(any())).thenReturn(Stream.of(operation1, operation2)); // when - Map operations = simpleOperationsScanner.scan(); + Map operations = springAnnotationOperationsScanner.scan(); // then assertThat(operations).containsExactly(operation2, operation1); @@ -57,10 +58,10 @@ void sameOperationsAreMergedTest() { Map.entry("operation1", Operation.builder().build()); Map.Entry operation2 = Map.entry("operation1", Operation.builder().build()); - when(classProcessor.process(any())).thenReturn(Stream.of(operation1, operation2)); + when(classProcessor.scan(any())).thenReturn(Stream.of(operation1, operation2)); // when - Map operations = simpleOperationsScanner.scan(); + Map operations = springAnnotationOperationsScanner.scan(); // then assertThat(operations) @@ -71,10 +72,10 @@ void sameOperationsAreMergedTest() { void processEmptyClassTest() { // given when(classScanner.scan()).thenReturn(Set.of(String.class)); - when(classProcessor.process(any())).thenReturn(Stream.of()); + when(classProcessor.scan(any())).thenReturn(Stream.of()); // when - Map operations = simpleOperationsScanner.scan(); + Map operations = springAnnotationOperationsScanner.scan(); // then assertThat(operations).isEmpty(); diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationOperationsScannerTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/AsyncAnnotationOperationsScannerTest.java similarity index 95% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationOperationsScannerTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/AsyncAnnotationOperationsScannerTest.java index 7599012fb..b2745b9ab 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/AsyncAnnotationOperationsScannerTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/AsyncAnnotationOperationsScannerTest.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.operations.annotations; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import io.github.springwolf.asyncapi.v3.model.channel.ChannelReference; @@ -14,21 +14,22 @@ import io.github.springwolf.asyncapi.v3.model.schema.MultiFormatSchema; import io.github.springwolf.asyncapi.v3.model.schema.SchemaReference; import io.github.springwolf.asyncapi.v3.model.server.Server; -import io.github.springwolf.core.asyncapi.scanners.bindings.MessageBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.bindings.OperationBindingProcessor; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncMessage; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.components.DefaultComponentsService; +import io.github.springwolf.core.asyncapi.components.SwaggerSchemaUtil; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaders; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.MessageBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.OperationBindingProcessor; import io.github.springwolf.core.asyncapi.scanners.bindings.processor.TestOperationBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncMessage; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; import io.github.springwolf.core.asyncapi.scanners.classes.ClassScanner; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaders; -import io.github.springwolf.core.configuration.AsyncApiDocket; -import io.github.springwolf.core.configuration.AsyncApiDocketService; +import io.github.springwolf.core.asyncapi.scanners.common.AsyncAnnotationScanner; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.configuration.docket.AsyncApiDocket; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; -import io.github.springwolf.core.schemas.ComponentsService; -import io.github.springwolf.core.schemas.DefaultComponentsService; -import io.github.springwolf.core.schemas.SwaggerSchemaUtil; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/ClassLevelAnnotationOperationsScannerTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/SpringAnnotationClassLevelOperationsScannerTest.java similarity index 88% rename from springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/ClassLevelAnnotationOperationsScannerTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/SpringAnnotationClassLevelOperationsScannerTest.java index 5d4bb57b9..016331ab2 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/channels/annotation/ClassLevelAnnotationOperationsScannerTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/asyncapi/scanners/operations/annotations/SpringAnnotationClassLevelOperationsScannerTest.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.asyncapi.scanners.channels.annotation; +package io.github.springwolf.core.asyncapi.scanners.operations.annotations; import io.github.springwolf.asyncapi.v3.bindings.ChannelBinding; import io.github.springwolf.asyncapi.v3.bindings.MessageBinding; @@ -16,11 +16,11 @@ import io.github.springwolf.asyncapi.v3.model.operation.OperationAction; import io.github.springwolf.asyncapi.v3.model.schema.MultiFormatSchema; import io.github.springwolf.asyncapi.v3.model.schema.SchemaReference; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaders; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeadersNotDocumented; import io.github.springwolf.core.asyncapi.scanners.bindings.BindingFactory; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaders; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeadersNotDocumented; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; import lombok.Data; import lombok.NoArgsConstructor; import org.junit.jupiter.api.BeforeEach; @@ -38,13 +38,13 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -class ClassLevelAnnotationOperationsScannerTest { +class SpringAnnotationClassLevelOperationsScannerTest { private final PayloadClassExtractor payloadClassExtractor = mock(PayloadClassExtractor.class); private final BindingFactory bindingFactory = mock(BindingFactory.class); private final ComponentsService componentsService = mock(ComponentsService.class); - ClassLevelAnnotationOperationsScanner scanner = - new ClassLevelAnnotationOperationsScanner<>( + SpringAnnotationClassLevelOperationsScanner scanner = + new SpringAnnotationClassLevelOperationsScanner<>( TestClassListener.class, TestMethodListener.class, bindingFactory, @@ -82,7 +82,7 @@ void setUp() { void scan_componentHasTestListenerMethods() { // when List> operations = - scanner.process(ClassWithTestListenerAnnotation.class).toList(); + scanner.scan(ClassWithTestListenerAnnotation.class).toList(); // then MessagePayload payload = MessagePayload.of(MultiFormatSchema.builder() diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/example/DefaultSchemaWalkerJsonIntegrationTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/components/examples/walkers/DefaultSchemaWalkerJsonIntegrationTest.java similarity index 98% rename from springwolf-core/src/test/java/io/github/springwolf/core/schemas/example/DefaultSchemaWalkerJsonIntegrationTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/components/examples/walkers/DefaultSchemaWalkerJsonIntegrationTest.java index bf9e029ad..d500f5aa7 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/example/DefaultSchemaWalkerJsonIntegrationTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/components/examples/walkers/DefaultSchemaWalkerJsonIntegrationTest.java @@ -1,9 +1,10 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.example; +package io.github.springwolf.core.asyncapi.components.examples.walkers; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +import io.github.springwolf.core.asyncapi.components.examples.walkers.json.ExampleJsonValueGenerator; import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.BinarySchema; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/example/DefaultSchemaWalkerXmlIntegrationTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/components/examples/walkers/DefaultSchemaWalkerXmlIntegrationTest.java similarity index 98% rename from springwolf-core/src/test/java/io/github/springwolf/core/schemas/example/DefaultSchemaWalkerXmlIntegrationTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/components/examples/walkers/DefaultSchemaWalkerXmlIntegrationTest.java index 0211d353b..35bfedb54 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/example/DefaultSchemaWalkerXmlIntegrationTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/components/examples/walkers/DefaultSchemaWalkerXmlIntegrationTest.java @@ -1,6 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.example; +package io.github.springwolf.core.asyncapi.components.examples.walkers; +import io.github.springwolf.core.asyncapi.components.examples.walkers.xml.DefaultExampleXmlValueSerializer; +import io.github.springwolf.core.asyncapi.components.examples.walkers.xml.ExampleXmlValueGenerator; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.BinarySchema; import io.swagger.v3.oas.models.media.BooleanSchema; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/example/DefaultSchemaWalkerYamlIntegrationTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/components/examples/walkers/DefaultSchemaWalkerYamlIntegrationTest.java similarity index 97% rename from springwolf-core/src/test/java/io/github/springwolf/core/schemas/example/DefaultSchemaWalkerYamlIntegrationTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/components/examples/walkers/DefaultSchemaWalkerYamlIntegrationTest.java index 768c6da76..9b02dda05 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/schemas/example/DefaultSchemaWalkerYamlIntegrationTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/components/examples/walkers/DefaultSchemaWalkerYamlIntegrationTest.java @@ -1,7 +1,10 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.schemas.example; +package io.github.springwolf.core.asyncapi.components.examples.walkers; import com.fasterxml.jackson.databind.JsonNode; +import io.github.springwolf.core.asyncapi.components.examples.walkers.json.ExampleJsonValueGenerator; +import io.github.springwolf.core.asyncapi.components.examples.walkers.yaml.DefaultExampleYamlValueSerializer; +import io.github.springwolf.core.asyncapi.components.examples.walkers.yaml.ExampleYamlValueGenerator; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.BinarySchema; import io.swagger.v3.oas.models.media.BooleanSchema; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/configuration/DefaultAsyncApiDocketServiceIntegrationTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/configuration/docket/DefaultAsyncApiDocketServiceIntegrationTest.java similarity index 97% rename from springwolf-core/src/test/java/io/github/springwolf/core/configuration/DefaultAsyncApiDocketServiceIntegrationTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/configuration/docket/DefaultAsyncApiDocketServiceIntegrationTest.java index 3d72a6b54..6834af289 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/configuration/DefaultAsyncApiDocketServiceIntegrationTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/configuration/docket/DefaultAsyncApiDocketServiceIntegrationTest.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.configuration; +package io.github.springwolf.core.configuration.docket; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; import org.junit.jupiter.api.Nested; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/configuration/DefaultAsyncApiDocketServiceTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/configuration/docket/DefaultAsyncApiDocketServiceTest.java similarity index 98% rename from springwolf-core/src/test/java/io/github/springwolf/core/configuration/DefaultAsyncApiDocketServiceTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/configuration/docket/DefaultAsyncApiDocketServiceTest.java index 3cf73d4a2..3b5705ccf 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/configuration/DefaultAsyncApiDocketServiceTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/configuration/docket/DefaultAsyncApiDocketServiceTest.java @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.configuration; +package io.github.springwolf.core.configuration.docket; import io.github.springwolf.asyncapi.v3.model.info.Contact; import io.github.springwolf.asyncapi.v3.model.info.License; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/configuration/SpringwolfConfigPropertiesIntegrationTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/configuration/properties/SpringwolfConfigPropertiesIntegrationTest.java similarity index 98% rename from springwolf-core/src/test/java/io/github/springwolf/core/configuration/SpringwolfConfigPropertiesIntegrationTest.java rename to springwolf-core/src/test/java/io/github/springwolf/core/configuration/properties/SpringwolfConfigPropertiesIntegrationTest.java index a470f7d40..a72831c39 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/configuration/SpringwolfConfigPropertiesIntegrationTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/configuration/properties/SpringwolfConfigPropertiesIntegrationTest.java @@ -1,8 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 -package io.github.springwolf.core.configuration; +package io.github.springwolf.core.configuration.properties; import io.github.springwolf.asyncapi.v3.model.server.Server; -import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/fixtures/AsyncApiDocketFixture.java b/springwolf-core/src/test/java/io/github/springwolf/core/fixtures/AsyncApiDocketFixture.java index 42d652ebb..6bcca29e9 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/fixtures/AsyncApiDocketFixture.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/fixtures/AsyncApiDocketFixture.java @@ -2,7 +2,7 @@ package io.github.springwolf.core.fixtures; import io.github.springwolf.asyncapi.v3.model.info.Info; -import io.github.springwolf.core.configuration.AsyncApiDocket; +import io.github.springwolf.core.configuration.docket.AsyncApiDocket; public class AsyncApiDocketFixture { diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/fixtures/MinimalIntegrationTestContextConfiguration.java b/springwolf-core/src/test/java/io/github/springwolf/core/fixtures/MinimalIntegrationTestContextConfiguration.java index 9d6f2f0de..64f8848e9 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/fixtures/MinimalIntegrationTestContextConfiguration.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/fixtures/MinimalIntegrationTestContextConfiguration.java @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.core.fixtures; -import io.github.springwolf.core.SpringwolfAutoConfiguration; +import io.github.springwolf.core.configuration.SpringwolfAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/AutoConfigurationIntegrationTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/AutoConfigurationIntegrationTest.java index d0fe2232b..beb1db95b 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/AutoConfigurationIntegrationTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/AutoConfigurationIntegrationTest.java @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.core.integrationtests; -import io.github.springwolf.core.asyncapi.controller.AsyncApiController; +import io.github.springwolf.core.controller.AsyncApiController; import io.github.springwolf.core.fixtures.MinimalIntegrationTestContextConfiguration; import io.github.springwolf.core.integrationtests.application.basic.TestApplication; import org.junit.jupiter.api.Nested; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/InitModeIntegrationTest.java b/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/InitModeIntegrationTest.java index 022f64d27..85a95d13e 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/InitModeIntegrationTest.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/InitModeIntegrationTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.core.integrationtests; import io.github.springwolf.core.asyncapi.DefaultAsyncApiService; -import io.github.springwolf.core.asyncapi.controller.AsyncApiController; +import io.github.springwolf.core.controller.AsyncApiController; import io.github.springwolf.core.fixtures.MinimalIntegrationTestContextConfiguration; import io.github.springwolf.core.integrationtests.application.basic.TestApplication; import org.junit.jupiter.api.Nested; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/application/listener/ListenerApplication.java b/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/application/listener/ListenerApplication.java index aced8a666..230c6ef03 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/application/listener/ListenerApplication.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/application/listener/ListenerApplication.java @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.core.integrationtests.application.listener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/application/polymorphic/PolymorphicPayloadApplication.java b/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/application/polymorphic/PolymorphicPayloadApplication.java index b9d3f51d7..123b9d1e3 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/application/polymorphic/PolymorphicPayloadApplication.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/application/polymorphic/PolymorphicPayloadApplication.java @@ -3,8 +3,8 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; diff --git a/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/application/publisher/PublisherApplication.java b/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/application/publisher/PublisherApplication.java index 34d39c802..c48cde707 100644 --- a/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/application/publisher/PublisherApplication.java +++ b/springwolf-core/src/test/java/io/github/springwolf/core/integrationtests/application/publisher/PublisherApplication.java @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.core.integrationtests.application.publisher; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncPublisher; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; +import io.github.springwolf.core.asyncapi.annotations.AsyncPublisher; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; diff --git a/springwolf-core/src/test/resources/schemas/annotation-definitions.json b/springwolf-core/src/test/resources/schemas/annotation-definitions.json index ea9cbd0a7..35768d588 100644 --- a/springwolf-core/src/test/resources/schemas/annotation-definitions.json +++ b/springwolf-core/src/test/resources/schemas/annotation-definitions.json @@ -1,5 +1,5 @@ { - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SchemaWithOneOf$AllOf" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SchemaWithOneOf$AllOf" : { "type" : "object", "examples" : [ { "firstOne" : "string", @@ -8,24 +8,24 @@ "secondTwo" : true } ], "allOf" : [ { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SchemaWithOneOf$ImplementationOne" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SchemaWithOneOf$ImplementationOne" }, { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" } ] }, - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SchemaWithOneOf$AnyOf" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SchemaWithOneOf$AnyOf" : { "type" : "object", "examples" : [ { "firstOne" : "string", "secondOne" : "string" } ], "anyOf" : [ { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SchemaWithOneOf$ImplementationOne" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SchemaWithOneOf$ImplementationOne" }, { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" } ] }, - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SchemaWithOneOf$ImplementationOne" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SchemaWithOneOf$ImplementationOne" : { "type" : "object", "properties" : { "firstOne" : { @@ -40,7 +40,7 @@ "secondOne" : "string" } ] }, - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" : { "type" : "object", "properties" : { "firstTwo" : { @@ -56,32 +56,32 @@ "secondTwo" : true } ] }, - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SchemaWithOneOf$OneOf" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SchemaWithOneOf$OneOf" : { "type" : "object", "examples" : [ { "firstOne" : "string", "secondOne" : "string" } ], "oneOf" : [ { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SchemaWithOneOf$ImplementationOne" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SchemaWithOneOf$ImplementationOne" }, { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" } ] }, - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SchemaWithOneOf$SchemaAnnotationFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SchemaWithOneOf$SchemaAnnotationFoo" : { "type" : "object", "properties" : { "allOf" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SchemaWithOneOf$AllOf" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SchemaWithOneOf$AllOf" }, "anyOf" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SchemaWithOneOf$AnyOf" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SchemaWithOneOf$AnyOf" }, "field" : { "type" : "string" }, "oneOf" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SchemaWithOneOf$OneOf" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SchemaWithOneOf$OneOf" } }, "examples" : [ { diff --git a/springwolf-core/src/test/resources/schemas/api-payload.json b/springwolf-core/src/test/resources/schemas/api-payload.json index 1349b2577..7a7e5f21b 100644 --- a/springwolf-core/src/test/resources/schemas/api-payload.json +++ b/springwolf-core/src/test/resources/schemas/api-payload.json @@ -1,5 +1,5 @@ { - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$AsyncApiPayloadTest$StringEnvelop" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$AsyncApiPayloadTest$StringEnvelop" : { "type" : "string", "description" : "The payload in the envelop", "maxLength" : 10, diff --git a/springwolf-core/src/test/resources/schemas/array-definitions.json b/springwolf-core/src/test/resources/schemas/array-definitions.json index d2eb0e476..7cea689f9 100644 --- a/springwolf-core/src/test/resources/schemas/array-definitions.json +++ b/springwolf-core/src/test/resources/schemas/array-definitions.json @@ -1,11 +1,11 @@ { - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$ArrayFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$ArrayFoo" : { "type" : "object", "properties" : { "flist" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SimpleFoo" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SimpleFoo" } } }, @@ -16,7 +16,7 @@ } ] } ] }, - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SimpleFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SimpleFoo" : { "type" : "object", "properties" : { "b" : { diff --git a/springwolf-core/src/test/resources/schemas/complex-definitions.json b/springwolf-core/src/test/resources/schemas/complex-definitions.json index df181e64c..1f25f9c6f 100644 --- a/springwolf-core/src/test/resources/schemas/complex-definitions.json +++ b/springwolf-core/src/test/resources/schemas/complex-definitions.json @@ -1,5 +1,5 @@ { - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$ComplexFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$ComplexFoo" : { "type" : "object", "properties" : { "b" : { @@ -22,7 +22,7 @@ "format" : "int32" }, "n" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$ComplexFoo$Nested" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$ComplexFoo$Nested" }, "s" : { "type" : "string" @@ -50,7 +50,7 @@ "s" : "string" } ] }, - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$ComplexFoo$Nested" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$ComplexFoo$Nested" : { "type" : "object", "properties" : { "nba" : { @@ -61,7 +61,7 @@ } }, "nc" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$ComplexFoo$Nested$Cyclic" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$ComplexFoo$Nested$Cyclic" }, "nli" : { "type" : "array", @@ -73,7 +73,7 @@ "nmfm" : { "type" : "object", "additionalProperties" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$ComplexFoo$Nested$MyClass" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$ComplexFoo$Nested$MyClass" } }, "ns" : { @@ -82,7 +82,7 @@ "nsm" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$ComplexFoo$Nested$MyClass" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$ComplexFoo$Nested$MyClass" }, "uniqueItems" : true }, @@ -105,18 +105,18 @@ "nu" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ] }, - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$ComplexFoo$Nested$Cyclic" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$ComplexFoo$Nested$Cyclic" : { "type" : "object", "properties" : { "cyclic" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$ComplexFoo$Nested$Cyclic" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$ComplexFoo$Nested$Cyclic" } }, "examples" : [ { "cyclic" : { } } ] }, - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$ComplexFoo$Nested$MyClass" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$ComplexFoo$Nested$MyClass" : { "type" : "object", "properties" : { "s" : { diff --git a/springwolf-core/src/test/resources/schemas/definitions.json b/springwolf-core/src/test/resources/schemas/definitions.json index 54ff18e94..acae51de6 100644 --- a/springwolf-core/src/test/resources/schemas/definitions.json +++ b/springwolf-core/src/test/resources/schemas/definitions.json @@ -1,9 +1,9 @@ { - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$CompositeFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$CompositeFoo" : { "type" : "object", "properties" : { "f" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SimpleFoo" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SimpleFoo" }, "s" : { "type" : "string" @@ -17,7 +17,7 @@ "s" : "string" } ] }, - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$FooWithEnum" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$FooWithEnum" : { "type" : "object", "properties" : { "b" : { @@ -33,7 +33,7 @@ "s" : "string" } ] }, - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SimpleFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SimpleFoo" : { "type" : "object", "properties" : { "b" : { diff --git a/springwolf-core/src/test/resources/schemas/documented-definitions.json b/springwolf-core/src/test/resources/schemas/documented-definitions.json index 21ee56d67..4b30a869d 100644 --- a/springwolf-core/src/test/resources/schemas/documented-definitions.json +++ b/springwolf-core/src/test/resources/schemas/documented-definitions.json @@ -1,5 +1,5 @@ { - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$DocumentedSimpleFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$DocumentedSimpleFoo" : { "type" : "object", "properties" : { "bi" : { @@ -11,7 +11,7 @@ "examples" : [ "2000-01-01T02:00:00+02:00" ] }, "f" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SimpleFoo" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SimpleFoo" }, "ls_plain" : { "type" : "array", @@ -64,7 +64,7 @@ } ], "required" : [ "dt", "f", "s" ] }, - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$SimpleFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$SimpleFoo" : { "type" : "object", "properties" : { "b" : { diff --git a/springwolf-core/src/test/resources/schemas/generics-wrapper-definitions.json b/springwolf-core/src/test/resources/schemas/generics-wrapper-definitions.json index f91536a65..6c3564859 100644 --- a/springwolf-core/src/test/resources/schemas/generics-wrapper-definitions.json +++ b/springwolf-core/src/test/resources/schemas/generics-wrapper-definitions.json @@ -1,5 +1,5 @@ { - "io.github.springwolf.core.schemas.DefaultJsonComponentsServiceTest$ListWrapper" : { + "io.github.springwolf.core.asyncapi.components.DefaultJsonComponentsServiceTest$ListWrapper" : { "type" : "array", "properties" : { "empty" : { diff --git a/springwolf-core/src/test/resources/schemas/xml/annotation-definitions-xml.json b/springwolf-core/src/test/resources/schemas/xml/annotation-definitions-xml.json index 0ea73522e..e033522e6 100644 --- a/springwolf-core/src/test/resources/schemas/xml/annotation-definitions-xml.json +++ b/springwolf-core/src/test/resources/schemas/xml/annotation-definitions-xml.json @@ -1,23 +1,23 @@ { - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SchemaWithOneOf$AllOf" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SchemaWithOneOf$AllOf" : { "type" : "string", "examples" : [ "string0stringtrue" ], "allOf" : [ { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SchemaWithOneOf$ImplementationOne" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SchemaWithOneOf$ImplementationOne" }, { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" } ] }, - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SchemaWithOneOf$AnyOf" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SchemaWithOneOf$AnyOf" : { "type" : "string", "examples" : [ "stringstring" ], "anyOf" : [ { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SchemaWithOneOf$ImplementationOne" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SchemaWithOneOf$ImplementationOne" }, { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" } ] }, - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SchemaWithOneOf$ImplementationOne" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SchemaWithOneOf$ImplementationOne" : { "type" : "string", "properties" : { "firstOne" : { @@ -29,7 +29,7 @@ }, "examples" : [ "stringstring" ] }, - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" : { "type" : "string", "properties" : { "firstTwo" : { @@ -42,29 +42,29 @@ }, "examples" : [ "0true" ] }, - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SchemaWithOneOf$OneOf" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SchemaWithOneOf$OneOf" : { "type" : "string", "examples" : [ "stringstring" ], "oneOf" : [ { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SchemaWithOneOf$ImplementationOne" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SchemaWithOneOf$ImplementationOne" }, { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" } ] }, - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SchemaWithOneOf$SchemaAnnotationFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SchemaWithOneOf$SchemaAnnotationFoo" : { "type" : "string", "properties" : { "allOf" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SchemaWithOneOf$AllOf" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SchemaWithOneOf$AllOf" }, "anyOf" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SchemaWithOneOf$AnyOf" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SchemaWithOneOf$AnyOf" }, "field" : { "type" : "string" }, "oneOf" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SchemaWithOneOf$OneOf" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SchemaWithOneOf$OneOf" } }, "examples" : [ "string0stringtruestringstringstringstringstring" ] diff --git a/springwolf-core/src/test/resources/schemas/xml/api-payload-xml.json b/springwolf-core/src/test/resources/schemas/xml/api-payload-xml.json index 94eba03fd..26126755c 100644 --- a/springwolf-core/src/test/resources/schemas/xml/api-payload-xml.json +++ b/springwolf-core/src/test/resources/schemas/xml/api-payload-xml.json @@ -1,5 +1,5 @@ { - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$AsyncApiPayloadTest$StringEnvelop" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$AsyncApiPayloadTest$StringEnvelop" : { "type" : "string", "description" : "The payload in the envelop", "maxLength" : 10, diff --git a/springwolf-core/src/test/resources/schemas/xml/array-definitions-xml.json b/springwolf-core/src/test/resources/schemas/xml/array-definitions-xml.json index c48117787..ac4d40722 100644 --- a/springwolf-core/src/test/resources/schemas/xml/array-definitions-xml.json +++ b/springwolf-core/src/test/resources/schemas/xml/array-definitions-xml.json @@ -1,17 +1,17 @@ { - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$ArrayFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$ArrayFoo" : { "type" : "string", "properties" : { "flist" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SimpleFoo" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SimpleFoo" } } }, "examples" : [ "truestring" ] }, - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SimpleFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SimpleFoo" : { "type" : "string", "properties" : { "b" : { diff --git a/springwolf-core/src/test/resources/schemas/xml/complex-definitions-xml.json b/springwolf-core/src/test/resources/schemas/xml/complex-definitions-xml.json index a2d9bf08b..d3912446a 100644 --- a/springwolf-core/src/test/resources/schemas/xml/complex-definitions-xml.json +++ b/springwolf-core/src/test/resources/schemas/xml/complex-definitions-xml.json @@ -1,5 +1,5 @@ { - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$ComplexFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$ComplexFoo" : { "type" : "string", "properties" : { "b" : { @@ -22,7 +22,7 @@ "format" : "int32" }, "n" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$ComplexFoo$Nested" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$ComplexFoo$Nested" }, "s" : { "type" : "string" @@ -30,7 +30,7 @@ }, "examples" : [ "true1.1
2015-07-20T15:49:04-07:00
1.10YmFzZTY0LWV4YW1wbGU=0stringstring3fa85f64-5717-4562-b3fc-2c963f66afa6string
" ] }, - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$ComplexFoo$Nested" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$ComplexFoo$Nested" : { "type" : "string", "properties" : { "nba" : { @@ -41,7 +41,7 @@ } }, "nc" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$ComplexFoo$Nested$Cyclic" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$ComplexFoo$Nested$Cyclic" }, "nli" : { "type" : "array", @@ -53,7 +53,7 @@ "nmfm" : { "type" : "object", "additionalProperties" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$ComplexFoo$Nested$MyClass" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$ComplexFoo$Nested$MyClass" } }, "ns" : { @@ -62,7 +62,7 @@ "nsm" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$ComplexFoo$Nested$MyClass" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$ComplexFoo$Nested$MyClass" }, "uniqueItems" : true }, @@ -73,16 +73,16 @@ }, "examples" : [ "YmFzZTY0LWV4YW1wbGU=0stringstring3fa85f64-5717-4562-b3fc-2c963f66afa6" ] }, - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$ComplexFoo$Nested$Cyclic" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$ComplexFoo$Nested$Cyclic" : { "type" : "string", "properties" : { "cyclic" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$ComplexFoo$Nested$Cyclic" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$ComplexFoo$Nested$Cyclic" } }, "examples" : [ "" ] }, - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$ComplexFoo$Nested$MyClass" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$ComplexFoo$Nested$MyClass" : { "type" : "string", "properties" : { "s" : { diff --git a/springwolf-core/src/test/resources/schemas/xml/definitions-xml.json b/springwolf-core/src/test/resources/schemas/xml/definitions-xml.json index 22a9d4e9e..2c55700f0 100644 --- a/springwolf-core/src/test/resources/schemas/xml/definitions-xml.json +++ b/springwolf-core/src/test/resources/schemas/xml/definitions-xml.json @@ -1,9 +1,9 @@ { - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$CompositeFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$CompositeFoo" : { "type" : "string", "properties" : { "f" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SimpleFoo" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SimpleFoo" }, "s" : { "type" : "string" @@ -11,7 +11,7 @@ }, "examples" : [ "truestringstring" ] }, - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$FooWithEnum" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$FooWithEnum" : { "type" : "string", "properties" : { "b" : { @@ -24,7 +24,7 @@ }, "examples" : [ "BAR1string" ] }, - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SimpleFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SimpleFoo" : { "type" : "string", "properties" : { "b" : { diff --git a/springwolf-core/src/test/resources/schemas/xml/documented-definitions-xml.json b/springwolf-core/src/test/resources/schemas/xml/documented-definitions-xml.json index 115f9e1da..ae6d85c07 100644 --- a/springwolf-core/src/test/resources/schemas/xml/documented-definitions-xml.json +++ b/springwolf-core/src/test/resources/schemas/xml/documented-definitions-xml.json @@ -1,5 +1,5 @@ { - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$DocumentedSimpleFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$DocumentedSimpleFoo" : { "type" : "string", "properties" : { "bi" : { @@ -11,7 +11,7 @@ "examples" : [ "2000-01-01T02:00:00+02:00" ] }, "f" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SimpleFoo" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SimpleFoo" }, "ls_plain" : { "type" : "array", @@ -49,7 +49,7 @@ "examples" : [ "0
2000-01-01T02:00+02:00
truestringstrings value
" ], "required" : [ "dt", "f", "s" ] }, - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$SimpleFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$SimpleFoo" : { "type" : "string", "properties" : { "b" : { diff --git a/springwolf-core/src/test/resources/schemas/xml/generics-wrapper-definitions-xml.json b/springwolf-core/src/test/resources/schemas/xml/generics-wrapper-definitions-xml.json index e5384e93e..400594fbb 100644 --- a/springwolf-core/src/test/resources/schemas/xml/generics-wrapper-definitions-xml.json +++ b/springwolf-core/src/test/resources/schemas/xml/generics-wrapper-definitions-xml.json @@ -1,5 +1,5 @@ { - "io.github.springwolf.core.schemas.DefaultXmlComponentsServiceTest$ListWrapper" : { + "io.github.springwolf.core.asyncapi.components.DefaultXmlComponentsServiceTest$ListWrapper" : { "type" : "string", "properties" : { "empty" : { diff --git a/springwolf-core/src/test/resources/schemas/yaml/annotation-definitions-yaml.json b/springwolf-core/src/test/resources/schemas/yaml/annotation-definitions-yaml.json index c20c42e4f..d388bb994 100644 --- a/springwolf-core/src/test/resources/schemas/yaml/annotation-definitions-yaml.json +++ b/springwolf-core/src/test/resources/schemas/yaml/annotation-definitions-yaml.json @@ -1,23 +1,23 @@ { - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SchemaWithOneOf$AllOf" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SchemaWithOneOf$AllOf" : { "type" : "string", "examples" : [ "firstOne: string\nfirstTwo: 0\nsecondOne: string\nsecondTwo: true\n" ], "allOf" : [ { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SchemaWithOneOf$ImplementationOne" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SchemaWithOneOf$ImplementationOne" }, { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" } ] }, - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SchemaWithOneOf$AnyOf" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SchemaWithOneOf$AnyOf" : { "type" : "string", "examples" : [ "firstOne: string\nsecondOne: string\n" ], "anyOf" : [ { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SchemaWithOneOf$ImplementationOne" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SchemaWithOneOf$ImplementationOne" }, { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" } ] }, - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SchemaWithOneOf$ImplementationOne" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SchemaWithOneOf$ImplementationOne" : { "type" : "string", "properties" : { "firstOne" : { @@ -29,7 +29,7 @@ }, "examples" : [ "firstOne: string\nsecondOne: string\n" ] }, - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" : { "type" : "string", "properties" : { "firstTwo" : { @@ -42,29 +42,29 @@ }, "examples" : [ "firstTwo: 0\nsecondTwo: true\n" ] }, - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SchemaWithOneOf$OneOf" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SchemaWithOneOf$OneOf" : { "type" : "string", "examples" : [ "|\n firstOne: string\n secondOne: string\n" ], "oneOf" : [ { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SchemaWithOneOf$ImplementationOne" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SchemaWithOneOf$ImplementationOne" }, { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SchemaWithOneOf$ImplementationTwo" } ] }, - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SchemaWithOneOf$SchemaAnnotationFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SchemaWithOneOf$SchemaAnnotationFoo" : { "type" : "string", "properties" : { "allOf" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SchemaWithOneOf$AllOf" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SchemaWithOneOf$AllOf" }, "anyOf" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SchemaWithOneOf$AnyOf" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SchemaWithOneOf$AnyOf" }, "field" : { "type" : "string" }, "oneOf" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SchemaWithOneOf$OneOf" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SchemaWithOneOf$OneOf" } }, "examples" : [ "allOf: |\n firstOne: string\n firstTwo: 0\n secondOne: string\n secondTwo: true\nanyOf: |\n firstOne: string\n secondOne: string\nfield: string\noneOf: |\n |\n firstOne: string\n secondOne: string\n" ] diff --git a/springwolf-core/src/test/resources/schemas/yaml/api-payload-yaml.json b/springwolf-core/src/test/resources/schemas/yaml/api-payload-yaml.json index 550d08c98..5e3e567c3 100644 --- a/springwolf-core/src/test/resources/schemas/yaml/api-payload-yaml.json +++ b/springwolf-core/src/test/resources/schemas/yaml/api-payload-yaml.json @@ -1,5 +1,5 @@ { - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$AsyncApiPayloadTest$StringEnvelop" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$AsyncApiPayloadTest$StringEnvelop" : { "type" : "string", "description" : "The payload in the envelop", "maxLength" : 10, diff --git a/springwolf-core/src/test/resources/schemas/yaml/array-definitions-yaml.json b/springwolf-core/src/test/resources/schemas/yaml/array-definitions-yaml.json index 8791b64a2..4a3b592e5 100644 --- a/springwolf-core/src/test/resources/schemas/yaml/array-definitions-yaml.json +++ b/springwolf-core/src/test/resources/schemas/yaml/array-definitions-yaml.json @@ -1,17 +1,17 @@ { - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$ArrayFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$ArrayFoo" : { "type" : "string", "properties" : { "flist" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SimpleFoo" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SimpleFoo" } } }, "examples" : [ "flist:\n- b: true\n s: string\n" ] }, - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SimpleFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SimpleFoo" : { "type" : "string", "properties" : { "b" : { diff --git a/springwolf-core/src/test/resources/schemas/yaml/complex-definitions-yaml.json b/springwolf-core/src/test/resources/schemas/yaml/complex-definitions-yaml.json index 18155076c..3ac3bbaee 100644 --- a/springwolf-core/src/test/resources/schemas/yaml/complex-definitions-yaml.json +++ b/springwolf-core/src/test/resources/schemas/yaml/complex-definitions-yaml.json @@ -1,5 +1,5 @@ { - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$ComplexFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$ComplexFoo" : { "type" : "string", "properties" : { "b" : { @@ -22,7 +22,7 @@ "format" : "int32" }, "n" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$ComplexFoo$Nested" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$ComplexFoo$Nested" }, "s" : { "type" : "string" @@ -30,7 +30,7 @@ }, "examples" : [ "b: true\nd: 1.1\ndt: 2015-07-20T15:49:04-07:00\nf: 1.1\ni: 0\n\"n\":\n nba:\n - YmFzZTY0LWV4YW1wbGU=\n nc:\n cyclic: {}\n nli:\n - 0\n nmfm: {}\n ns: string\n nsm:\n - s: string\n nu: 3fa85f64-5717-4562-b3fc-2c963f66afa6\ns: string\n" ] }, - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$ComplexFoo$Nested" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$ComplexFoo$Nested" : { "type" : "string", "properties" : { "nba" : { @@ -41,7 +41,7 @@ } }, "nc" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$ComplexFoo$Nested$Cyclic" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$ComplexFoo$Nested$Cyclic" }, "nli" : { "type" : "array", @@ -53,7 +53,7 @@ "nmfm" : { "type" : "object", "additionalProperties" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$ComplexFoo$Nested$MyClass" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$ComplexFoo$Nested$MyClass" } }, "ns" : { @@ -62,7 +62,7 @@ "nsm" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$ComplexFoo$Nested$MyClass" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$ComplexFoo$Nested$MyClass" }, "uniqueItems" : true }, @@ -73,16 +73,16 @@ }, "examples" : [ "nba:\n- YmFzZTY0LWV4YW1wbGU=\nnc:\n cyclic: {}\nnli:\n- 0\nnmfm: {}\nns: string\nnsm:\n- s: string\nnu: 3fa85f64-5717-4562-b3fc-2c963f66afa6\n" ] }, - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$ComplexFoo$Nested$Cyclic" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$ComplexFoo$Nested$Cyclic" : { "type" : "string", "properties" : { "cyclic" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$ComplexFoo$Nested$Cyclic" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$ComplexFoo$Nested$Cyclic" } }, "examples" : [ "cyclic: {}\n" ] }, - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$ComplexFoo$Nested$MyClass" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$ComplexFoo$Nested$MyClass" : { "type" : "string", "properties" : { "s" : { diff --git a/springwolf-core/src/test/resources/schemas/yaml/definitions-yaml.json b/springwolf-core/src/test/resources/schemas/yaml/definitions-yaml.json index aedd6bb86..8c46c35d2 100644 --- a/springwolf-core/src/test/resources/schemas/yaml/definitions-yaml.json +++ b/springwolf-core/src/test/resources/schemas/yaml/definitions-yaml.json @@ -1,9 +1,9 @@ { - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$CompositeFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$CompositeFoo" : { "type" : "string", "properties" : { "f" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SimpleFoo" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SimpleFoo" }, "s" : { "type" : "string" @@ -11,7 +11,7 @@ }, "examples" : [ "f:\n b: true\n s: string\ns: string\n" ] }, - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$FooWithEnum" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$FooWithEnum" : { "type" : "string", "properties" : { "b" : { @@ -24,7 +24,7 @@ }, "examples" : [ "b: BAR1\ns: string\n" ] }, - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SimpleFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SimpleFoo" : { "type" : "string", "properties" : { "b" : { diff --git a/springwolf-core/src/test/resources/schemas/yaml/documented-definitions-yaml.json b/springwolf-core/src/test/resources/schemas/yaml/documented-definitions-yaml.json index 1dea26a55..fc8d7771d 100644 --- a/springwolf-core/src/test/resources/schemas/yaml/documented-definitions-yaml.json +++ b/springwolf-core/src/test/resources/schemas/yaml/documented-definitions-yaml.json @@ -1,5 +1,5 @@ { - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$DocumentedSimpleFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$DocumentedSimpleFoo" : { "type" : "string", "properties" : { "bi" : { @@ -11,7 +11,7 @@ "examples" : [ "2000-01-01T02:00:00+02:00" ] }, "f" : { - "$ref" : "#/components/schemas/io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SimpleFoo" + "$ref" : "#/components/schemas/io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SimpleFoo" }, "ls_plain" : { "type" : "array", @@ -51,7 +51,7 @@ "examples" : [ "bi: 0\ndt: 2000-01-01T02:00+02:00\nf:\n b: true\n s: string\nls_plain:\n- string\nmss:\n key1: value1\nmss_plain: {}\ns: s value\n" ], "required" : [ "dt", "f", "s" ] }, - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$SimpleFoo" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$SimpleFoo" : { "type" : "string", "properties" : { "b" : { diff --git a/springwolf-core/src/test/resources/schemas/yaml/generics-wrapper-definitions-yaml.json b/springwolf-core/src/test/resources/schemas/yaml/generics-wrapper-definitions-yaml.json index c1217d7d6..d75724c85 100644 --- a/springwolf-core/src/test/resources/schemas/yaml/generics-wrapper-definitions-yaml.json +++ b/springwolf-core/src/test/resources/schemas/yaml/generics-wrapper-definitions-yaml.json @@ -1,5 +1,5 @@ { - "io.github.springwolf.core.schemas.DefaultYamlComponentsServiceTest$ListWrapper" : { + "io.github.springwolf.core.asyncapi.components.DefaultYamlComponentsServiceTest$ListWrapper" : { "type" : "string", "properties" : { "empty" : { diff --git a/springwolf-examples/springwolf-amqp-example/src/main/java/io/github/springwolf/examples/amqp/producers/AnotherProducer.java b/springwolf-examples/springwolf-amqp-example/src/main/java/io/github/springwolf/examples/amqp/producers/AnotherProducer.java index 234579c3f..25d268a4b 100644 --- a/springwolf-examples/springwolf-amqp-example/src/main/java/io/github/springwolf/examples/amqp/producers/AnotherProducer.java +++ b/springwolf-examples/springwolf-amqp-example/src/main/java/io/github/springwolf/examples/amqp/producers/AnotherProducer.java @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.examples.amqp.producers; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncPublisher; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; +import io.github.springwolf.core.asyncapi.annotations.AsyncPublisher; import io.github.springwolf.examples.amqp.dtos.AnotherPayloadDto; import io.github.springwolf.plugins.amqp.scanners.channels.operationdata.annotation.AmqpAsyncOperationBinding; import lombok.RequiredArgsConstructor; diff --git a/springwolf-examples/springwolf-jms-example/src/main/java/io/github/springwolf/examples/jms/producers/AnotherProducer.java b/springwolf-examples/springwolf-jms-example/src/main/java/io/github/springwolf/examples/jms/producers/AnotherProducer.java index f77c2cadb..f23fd294e 100644 --- a/springwolf-examples/springwolf-jms-example/src/main/java/io/github/springwolf/examples/jms/producers/AnotherProducer.java +++ b/springwolf-examples/springwolf-jms-example/src/main/java/io/github/springwolf/examples/jms/producers/AnotherProducer.java @@ -2,8 +2,8 @@ package io.github.springwolf.examples.jms.producers; import io.github.springwolf.addons.generic_binding.annotation.AsyncGenericOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncPublisher; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; +import io.github.springwolf.core.asyncapi.annotations.AsyncPublisher; import io.github.springwolf.examples.jms.dtos.AnotherPayloadDto; import io.github.springwolf.plugins.jms.scanners.channels.operationdata.annotation.JmsAsyncOperationBinding; import lombok.RequiredArgsConstructor; diff --git a/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/AvroConsumer.java b/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/AvroConsumer.java index 71b0c6c38..70ccc390a 100644 --- a/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/AvroConsumer.java +++ b/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/AvroConsumer.java @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.examples.kafka.consumers; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; import io.github.springwolf.examples.kafka.dto.avro.AnotherPayloadAvroDto; import io.github.springwolf.plugins.kafka.scanners.channels.operationdata.annotation.KafkaAsyncOperationBinding; import lombok.RequiredArgsConstructor; diff --git a/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/ExampleClassLevelKafkaListener.java b/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/ExampleClassLevelKafkaListener.java index aacacac06..44f34704e 100644 --- a/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/ExampleClassLevelKafkaListener.java +++ b/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/ExampleClassLevelKafkaListener.java @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.examples.kafka.consumers; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; import io.github.springwolf.examples.kafka.dtos.AnotherPayloadDto; import io.github.springwolf.examples.kafka.dtos.ExamplePayloadDto; import io.github.springwolf.plugins.kafka.scanners.channels.operationdata.annotation.KafkaAsyncOperationBinding; diff --git a/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/StringConsumer.java b/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/StringConsumer.java index 4c701e8bd..d4e3e9fb8 100644 --- a/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/StringConsumer.java +++ b/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/StringConsumer.java @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.examples.kafka.consumers; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.AsyncApiPayload; +import io.github.springwolf.core.asyncapi.annotations.AsyncApiPayload; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; import io.github.springwolf.plugins.kafka.scanners.channels.operationdata.annotation.KafkaAsyncOperationBinding; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/XmlConsumer.java b/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/XmlConsumer.java index de168812f..b9627e84e 100644 --- a/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/XmlConsumer.java +++ b/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/XmlConsumer.java @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.examples.kafka.consumers; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncMessage; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncMessage; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; import io.github.springwolf.examples.kafka.dtos.XmlPayloadDto; import io.github.springwolf.plugins.kafka.scanners.channels.operationdata.annotation.KafkaAsyncOperationBinding; import lombok.RequiredArgsConstructor; diff --git a/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/YamlConsumer.java b/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/YamlConsumer.java index 87d1e7d4c..1966de3b7 100644 --- a/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/YamlConsumer.java +++ b/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/consumers/YamlConsumer.java @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.examples.kafka.consumers; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncMessage; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncMessage; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; import io.github.springwolf.examples.kafka.dtos.YamlPayloadDto; import io.github.springwolf.plugins.kafka.scanners.channels.operationdata.annotation.KafkaAsyncOperationBinding; import lombok.RequiredArgsConstructor; diff --git a/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/producers/NestedProducer.java b/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/producers/NestedProducer.java index cce33a91a..7917b2029 100644 --- a/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/producers/NestedProducer.java +++ b/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/producers/NestedProducer.java @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.examples.kafka.producers; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncPublisher; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeadersCloudEventConstants; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; +import io.github.springwolf.core.asyncapi.annotations.AsyncPublisher; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeadersCloudEventConstants; import io.github.springwolf.examples.kafka.configuration.KafkaConfiguration; import io.github.springwolf.examples.kafka.dtos.NestedPayloadDto; import io.github.springwolf.plugins.kafka.scanners.channels.operationdata.annotation.KafkaAsyncOperationBinding; diff --git a/springwolf-examples/springwolf-sns-example/src/main/java/io/github/springwolf/examples/sns/consumers/ExampleConsumer.java b/springwolf-examples/springwolf-sns-example/src/main/java/io/github/springwolf/examples/sns/consumers/ExampleConsumer.java index 9ff7a2d4f..183499a85 100644 --- a/springwolf-examples/springwolf-sns-example/src/main/java/io/github/springwolf/examples/sns/consumers/ExampleConsumer.java +++ b/springwolf-examples/springwolf-sns-example/src/main/java/io/github/springwolf/examples/sns/consumers/ExampleConsumer.java @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.examples.sns.consumers; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; import io.github.springwolf.examples.sns.dtos.AnotherPayloadDto; import io.github.springwolf.examples.sns.dtos.ExamplePayloadDto; import io.github.springwolf.examples.sns.producers.AnotherProducer; diff --git a/springwolf-examples/springwolf-sns-example/src/main/java/io/github/springwolf/examples/sns/producers/AnotherProducer.java b/springwolf-examples/springwolf-sns-example/src/main/java/io/github/springwolf/examples/sns/producers/AnotherProducer.java index 5d36cbade..e10d1fef9 100644 --- a/springwolf-examples/springwolf-sns-example/src/main/java/io/github/springwolf/examples/sns/producers/AnotherProducer.java +++ b/springwolf-examples/springwolf-sns-example/src/main/java/io/github/springwolf/examples/sns/producers/AnotherProducer.java @@ -2,8 +2,8 @@ package io.github.springwolf.examples.sns.producers; import io.awspring.cloud.sns.core.SnsTemplate; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncPublisher; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; +import io.github.springwolf.core.asyncapi.annotations.AsyncPublisher; import io.github.springwolf.examples.sns.dtos.AnotherPayloadDto; import io.github.springwolf.plugins.sns.scanners.channels.operationdata.annotation.SnsAsyncOperationBinding; import io.github.springwolf.plugins.sns.scanners.channels.operationdata.annotation.SnsAsyncOperationBindingIdentifier; diff --git a/springwolf-examples/springwolf-sqs-example/src/main/java/io/github/springwolf/examples/sqs/producers/AnotherProducer.java b/springwolf-examples/springwolf-sqs-example/src/main/java/io/github/springwolf/examples/sqs/producers/AnotherProducer.java index 308567796..e541cc596 100644 --- a/springwolf-examples/springwolf-sqs-example/src/main/java/io/github/springwolf/examples/sqs/producers/AnotherProducer.java +++ b/springwolf-examples/springwolf-sqs-example/src/main/java/io/github/springwolf/examples/sqs/producers/AnotherProducer.java @@ -2,8 +2,8 @@ package io.github.springwolf.examples.sqs.producers; import io.awspring.cloud.sqs.operations.SqsTemplate; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncPublisher; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperation; +import io.github.springwolf.core.asyncapi.annotations.AsyncPublisher; import io.github.springwolf.examples.sqs.dtos.AnotherPayloadDto; import io.github.springwolf.plugins.sqs.scanners.channels.operationdata.annotation.SqsAsyncOperationBinding; import io.github.springwolf.plugins.sqs.scanners.channels.operationdata.annotation.SqsAsyncQueueBinding; diff --git a/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/configuration/SpringwolfAmqpProducerConfiguration.java b/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/configuration/SpringwolfAmqpProducerConfiguration.java index fb22302a0..8718cae7d 100644 --- a/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/configuration/SpringwolfAmqpProducerConfiguration.java +++ b/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/configuration/SpringwolfAmqpProducerConfiguration.java @@ -2,7 +2,7 @@ package io.github.springwolf.plugins.amqp.configuration; import io.github.springwolf.core.asyncapi.AsyncApiService; -import io.github.springwolf.core.asyncapi.controller.PublishingPayloadCreator; +import io.github.springwolf.core.controller.PublishingPayloadCreator; import io.github.springwolf.plugins.amqp.controller.SpringwolfAmqpController; import io.github.springwolf.plugins.amqp.producer.SpringwolfAmqpProducer; import org.springframework.amqp.rabbit.core.RabbitTemplate; diff --git a/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/configuration/SpringwolfAmqpScannerConfiguration.java b/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/configuration/SpringwolfAmqpScannerConfiguration.java index 71c28767c..0ad595180 100644 --- a/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/configuration/SpringwolfAmqpScannerConfiguration.java +++ b/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/configuration/SpringwolfAmqpScannerConfiguration.java @@ -1,17 +1,17 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.amqp.configuration; +import io.github.springwolf.core.asyncapi.components.ComponentsService; import io.github.springwolf.core.asyncapi.scanners.bindings.BindingProcessorPriority; import io.github.springwolf.core.asyncapi.scanners.channels.ChannelPriority; -import io.github.springwolf.core.asyncapi.scanners.channels.SimpleChannelsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.SimpleOperationsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.ClassLevelAnnotationChannelsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.ClassLevelAnnotationOperationsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.MethodLevelAnnotationChannelsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.MethodLevelAnnotationOperationsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.channels.SpringAnnotationChannelsScanner; +import io.github.springwolf.core.asyncapi.scanners.channels.annotations.SpringAnnotationClassLevelChannelsScanner; +import io.github.springwolf.core.asyncapi.scanners.channels.annotations.SpringAnnotationMethodLevelChannelsScanner; import io.github.springwolf.core.asyncapi.scanners.classes.SpringwolfClassScanner; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.operations.SpringAnnotationOperationsScanner; +import io.github.springwolf.core.asyncapi.scanners.operations.annotations.SpringAnnotationClassLevelOperationsScanner; +import io.github.springwolf.core.asyncapi.scanners.operations.annotations.SpringAnnotationMethodLevelOperationsScanner; import io.github.springwolf.plugins.amqp.scanners.bindings.AmqpBindingFactory; import io.github.springwolf.plugins.amqp.scanners.bindings.processor.AmqpMessageBindingProcessor; import io.github.springwolf.plugins.amqp.scanners.bindings.processor.AmqpOperationBindingProcessor; @@ -61,14 +61,14 @@ public AsyncHeadersForAmqpBuilder asyncHeadersForAmqpBuilder() { havingValue = "true", matchIfMissing = true) @Order(value = ChannelPriority.AUTO_DISCOVERED) - public SimpleChannelsScanner simpleRabbitClassLevelListenerAnnotationChannelsScanner( + public SpringAnnotationChannelsScanner simpleRabbitClassLevelListenerAnnotationChannelsScanner( SpringwolfClassScanner classScanner, AmqpBindingFactory amqpBindingBuilder, AsyncHeadersForAmqpBuilder asyncHeadersForAmqpBuilder, PayloadClassExtractor payloadClassExtractor, ComponentsService componentsService) { - ClassLevelAnnotationChannelsScanner strategy = - new ClassLevelAnnotationChannelsScanner<>( + SpringAnnotationClassLevelChannelsScanner strategy = + new SpringAnnotationClassLevelChannelsScanner<>( RabbitListener.class, RabbitHandler.class, amqpBindingBuilder, @@ -76,7 +76,7 @@ public SimpleChannelsScanner simpleRabbitClassLevelListenerAnnotationChannelsSca payloadClassExtractor, componentsService); - return new SimpleChannelsScanner(classScanner, strategy); + return new SpringAnnotationChannelsScanner(classScanner, strategy); } @Bean @@ -85,14 +85,14 @@ public SimpleChannelsScanner simpleRabbitClassLevelListenerAnnotationChannelsSca havingValue = "true", matchIfMissing = true) @Order(value = ChannelPriority.AUTO_DISCOVERED) - public SimpleOperationsScanner simpleRabbitClassLevelListenerAnnotationOperationsScanner( + public SpringAnnotationOperationsScanner simpleRabbitClassLevelListenerAnnotationOperationsScanner( SpringwolfClassScanner classScanner, AmqpBindingFactory amqpBindingBuilder, AsyncHeadersForAmqpBuilder asyncHeadersForAmqpBuilder, PayloadClassExtractor payloadClassExtractor, ComponentsService componentsService) { - ClassLevelAnnotationOperationsScanner strategy = - new ClassLevelAnnotationOperationsScanner<>( + SpringAnnotationClassLevelOperationsScanner strategy = + new SpringAnnotationClassLevelOperationsScanner<>( RabbitListener.class, RabbitHandler.class, amqpBindingBuilder, @@ -100,7 +100,7 @@ public SimpleOperationsScanner simpleRabbitClassLevelListenerAnnotationOperation payloadClassExtractor, componentsService); - return new SimpleOperationsScanner(classScanner, strategy); + return new SpringAnnotationOperationsScanner(classScanner, strategy); } @Bean @@ -109,15 +109,16 @@ public SimpleOperationsScanner simpleRabbitClassLevelListenerAnnotationOperation havingValue = "true", matchIfMissing = true) @Order(value = ChannelPriority.AUTO_DISCOVERED) - public SimpleChannelsScanner simpleRabbitMethodLevelListenerAnnotationChannelsScanner( + public SpringAnnotationChannelsScanner simpleRabbitMethodLevelListenerAnnotationChannelsScanner( SpringwolfClassScanner classScanner, AmqpBindingFactory amqpBindingBuilder, PayloadClassExtractor payloadClassExtractor, ComponentsService componentsService) { - MethodLevelAnnotationChannelsScanner strategy = new MethodLevelAnnotationChannelsScanner<>( - RabbitListener.class, amqpBindingBuilder, payloadClassExtractor, componentsService); + SpringAnnotationMethodLevelChannelsScanner strategy = + new SpringAnnotationMethodLevelChannelsScanner<>( + RabbitListener.class, amqpBindingBuilder, payloadClassExtractor, componentsService); - return new SimpleChannelsScanner(classScanner, strategy); + return new SpringAnnotationChannelsScanner(classScanner, strategy); } @Bean @@ -126,15 +127,16 @@ public SimpleChannelsScanner simpleRabbitMethodLevelListenerAnnotationChannelsSc havingValue = "true", matchIfMissing = true) @Order(value = ChannelPriority.AUTO_DISCOVERED) - public SimpleOperationsScanner simpleRabbitMethodLevelListenerAnnotationOperationsScanner( + public SpringAnnotationOperationsScanner simpleRabbitMethodLevelListenerAnnotationOperationsScanner( SpringwolfClassScanner classScanner, AmqpBindingFactory amqpBindingBuilder, PayloadClassExtractor payloadClassExtractor, ComponentsService componentsService) { - MethodLevelAnnotationOperationsScanner strategy = new MethodLevelAnnotationOperationsScanner<>( - RabbitListener.class, amqpBindingBuilder, payloadClassExtractor, componentsService); + SpringAnnotationMethodLevelOperationsScanner strategy = + new SpringAnnotationMethodLevelOperationsScanner<>( + RabbitListener.class, amqpBindingBuilder, payloadClassExtractor, componentsService); - return new SimpleOperationsScanner(classScanner, strategy); + return new SpringAnnotationOperationsScanner(classScanner, strategy); } @Bean diff --git a/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/controller/SpringwolfAmqpController.java b/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/controller/SpringwolfAmqpController.java index cf8d19034..275d5402d 100644 --- a/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/controller/SpringwolfAmqpController.java +++ b/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/controller/SpringwolfAmqpController.java @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.amqp.controller; -import io.github.springwolf.core.asyncapi.controller.PublishingBaseController; -import io.github.springwolf.core.asyncapi.controller.PublishingPayloadCreator; -import io.github.springwolf.core.asyncapi.controller.dtos.MessageDto; +import io.github.springwolf.core.controller.PublishingBaseController; +import io.github.springwolf.core.controller.PublishingPayloadCreator; +import io.github.springwolf.core.controller.dtos.MessageDto; import io.github.springwolf.plugins.amqp.producer.SpringwolfAmqpProducer; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/scanners/bindings/processor/AmqpMessageBindingProcessor.java b/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/scanners/bindings/processor/AmqpMessageBindingProcessor.java index 8d7f21525..1bf585990 100644 --- a/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/scanners/bindings/processor/AmqpMessageBindingProcessor.java +++ b/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/scanners/bindings/processor/AmqpMessageBindingProcessor.java @@ -2,8 +2,8 @@ package io.github.springwolf.plugins.amqp.scanners.bindings.processor; import io.github.springwolf.asyncapi.v3.bindings.amqp.AMQPMessageBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.MessageBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedMessageBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.MessageBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.ProcessedMessageBinding; import io.github.springwolf.plugins.amqp.scanners.channels.operationdata.annotation.AmqpAsyncOperationBinding; import org.springframework.context.EmbeddedValueResolverAware; import org.springframework.util.StringValueResolver; diff --git a/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/scanners/bindings/processor/AmqpOperationBindingProcessor.java b/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/scanners/bindings/processor/AmqpOperationBindingProcessor.java index 3013f2931..c1e902fbd 100644 --- a/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/scanners/bindings/processor/AmqpOperationBindingProcessor.java +++ b/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/scanners/bindings/processor/AmqpOperationBindingProcessor.java @@ -2,8 +2,8 @@ package io.github.springwolf.plugins.amqp.scanners.bindings.processor; import io.github.springwolf.asyncapi.v3.bindings.amqp.AMQPOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.processor.AbstractOperationBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.AbstractOperationBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.ProcessedOperationBinding; import io.github.springwolf.plugins.amqp.scanners.channels.operationdata.annotation.AmqpAsyncOperationBinding; import java.util.Arrays; diff --git a/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/scanners/channels/operationdata/annotation/AmqpAsyncOperationBinding.java b/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/scanners/channels/operationdata/annotation/AmqpAsyncOperationBinding.java index acdff54e8..f7de15be0 100644 --- a/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/scanners/channels/operationdata/annotation/AmqpAsyncOperationBinding.java +++ b/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/scanners/channels/operationdata/annotation/AmqpAsyncOperationBinding.java @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.amqp.scanners.channels.operationdata.annotation; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.AsyncOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncPublisher; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperationBinding; +import io.github.springwolf.core.asyncapi.annotations.AsyncPublisher; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/types/channel/operation/message/header/AsyncHeadersForAmqpBuilder.java b/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/types/channel/operation/message/header/AsyncHeadersForAmqpBuilder.java index 8b97004b5..3e86f5d75 100644 --- a/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/types/channel/operation/message/header/AsyncHeadersForAmqpBuilder.java +++ b/springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/springwolf/plugins/amqp/types/channel/operation/message/header/AsyncHeadersForAmqpBuilder.java @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.amqp.types.channel.operation.message.header; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaders; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeadersBuilder; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaders; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeadersBuilder; public class AsyncHeadersForAmqpBuilder implements AsyncHeadersBuilder { diff --git a/springwolf-plugins/springwolf-amqp-plugin/src/test/java/io/github/springwolf/plugins/amqp/configuration/SpringwolfAmqpProducerConfigurationIntegrationTest.java b/springwolf-plugins/springwolf-amqp-plugin/src/test/java/io/github/springwolf/plugins/amqp/configuration/SpringwolfAmqpProducerConfigurationIntegrationTest.java index de688d59b..586e9fde2 100644 --- a/springwolf-plugins/springwolf-amqp-plugin/src/test/java/io/github/springwolf/plugins/amqp/configuration/SpringwolfAmqpProducerConfigurationIntegrationTest.java +++ b/springwolf-plugins/springwolf-amqp-plugin/src/test/java/io/github/springwolf/plugins/amqp/configuration/SpringwolfAmqpProducerConfigurationIntegrationTest.java @@ -2,11 +2,11 @@ package io.github.springwolf.plugins.amqp.configuration; import io.github.springwolf.core.asyncapi.AsyncApiService; -import io.github.springwolf.core.asyncapi.controller.PublishingPayloadCreator; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.components.ComponentsService; import io.github.springwolf.core.asyncapi.scanners.classes.SpringwolfClassScanner; -import io.github.springwolf.core.configuration.AsyncApiDocketService; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; +import io.github.springwolf.core.controller.PublishingPayloadCreator; import io.github.springwolf.plugins.amqp.controller.SpringwolfAmqpController; import io.github.springwolf.plugins.amqp.producer.SpringwolfAmqpProducer; import org.junit.jupiter.api.Nested; diff --git a/springwolf-plugins/springwolf-amqp-plugin/src/test/java/io/github/springwolf/plugins/amqp/scanners/bindings/processor/AmqpMessageBindingProcessorTest.java b/springwolf-plugins/springwolf-amqp-plugin/src/test/java/io/github/springwolf/plugins/amqp/scanners/bindings/processor/AmqpMessageBindingProcessorTest.java index 985334256..f1ce05326 100644 --- a/springwolf-plugins/springwolf-amqp-plugin/src/test/java/io/github/springwolf/plugins/amqp/scanners/bindings/processor/AmqpMessageBindingProcessorTest.java +++ b/springwolf-plugins/springwolf-amqp-plugin/src/test/java/io/github/springwolf/plugins/amqp/scanners/bindings/processor/AmqpMessageBindingProcessorTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.plugins.amqp.scanners.bindings.processor; import io.github.springwolf.asyncapi.v3.bindings.amqp.AMQPMessageBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedMessageBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.ProcessedMessageBinding; import io.github.springwolf.plugins.amqp.scanners.channels.operationdata.annotation.AmqpAsyncOperationBinding; import org.junit.jupiter.api.Test; diff --git a/springwolf-plugins/springwolf-amqp-plugin/src/test/java/io/github/springwolf/plugins/amqp/scanners/bindings/processor/AmqpOperationBindingProcessorTest.java b/springwolf-plugins/springwolf-amqp-plugin/src/test/java/io/github/springwolf/plugins/amqp/scanners/bindings/processor/AmqpOperationBindingProcessorTest.java index 9c9ef38e5..a28b1eb5c 100644 --- a/springwolf-plugins/springwolf-amqp-plugin/src/test/java/io/github/springwolf/plugins/amqp/scanners/bindings/processor/AmqpOperationBindingProcessorTest.java +++ b/springwolf-plugins/springwolf-amqp-plugin/src/test/java/io/github/springwolf/plugins/amqp/scanners/bindings/processor/AmqpOperationBindingProcessorTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.plugins.amqp.scanners.bindings.processor; import io.github.springwolf.asyncapi.v3.bindings.amqp.AMQPOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedOperationBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.ProcessedOperationBinding; import io.github.springwolf.plugins.amqp.scanners.channels.operationdata.annotation.AmqpAsyncOperationBinding; import org.junit.jupiter.api.Test; diff --git a/springwolf-plugins/springwolf-cloud-stream-plugin/src/main/java/io/github/springwolf/plugins/cloudstream/configuration/SpringwolfCloudStreamAutoConfiguration.java b/springwolf-plugins/springwolf-cloud-stream-plugin/src/main/java/io/github/springwolf/plugins/cloudstream/configuration/SpringwolfCloudStreamAutoConfiguration.java index 361308d08..a07d7d3d2 100644 --- a/springwolf-plugins/springwolf-cloud-stream-plugin/src/main/java/io/github/springwolf/plugins/cloudstream/configuration/SpringwolfCloudStreamAutoConfiguration.java +++ b/springwolf-plugins/springwolf-cloud-stream-plugin/src/main/java/io/github/springwolf/plugins/cloudstream/configuration/SpringwolfCloudStreamAutoConfiguration.java @@ -1,11 +1,11 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.cloudstream.configuration; +import io.github.springwolf.core.asyncapi.components.ComponentsService; import io.github.springwolf.core.asyncapi.scanners.beans.BeanMethodsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; -import io.github.springwolf.core.configuration.AsyncApiDocketService; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; import io.github.springwolf.core.configuration.properties.SpringwolfConfigConstants; -import io.github.springwolf.core.schemas.ComponentsService; import io.github.springwolf.plugins.cloudstream.scanners.channels.CloudStreamFunctionChannelsScanner; import io.github.springwolf.plugins.cloudstream.scanners.channels.CloudStreamFunctionOperationsScanner; import io.github.springwolf.plugins.cloudstream.scanners.channels.FunctionalChannelBeanBuilder; diff --git a/springwolf-plugins/springwolf-cloud-stream-plugin/src/main/java/io/github/springwolf/plugins/cloudstream/scanners/channels/CloudStreamFunctionChannelsScanner.java b/springwolf-plugins/springwolf-cloud-stream-plugin/src/main/java/io/github/springwolf/plugins/cloudstream/scanners/channels/CloudStreamFunctionChannelsScanner.java index 850abb3eb..35ee99773 100644 --- a/springwolf-plugins/springwolf-cloud-stream-plugin/src/main/java/io/github/springwolf/plugins/cloudstream/scanners/channels/CloudStreamFunctionChannelsScanner.java +++ b/springwolf-plugins/springwolf-cloud-stream-plugin/src/main/java/io/github/springwolf/plugins/cloudstream/scanners/channels/CloudStreamFunctionChannelsScanner.java @@ -2,6 +2,8 @@ package io.github.springwolf.plugins.cloudstream.scanners.channels; import io.github.springwolf.asyncapi.v3.bindings.ChannelBinding; +import io.github.springwolf.asyncapi.v3.bindings.EmptyChannelBinding; +import io.github.springwolf.asyncapi.v3.bindings.EmptyMessageBinding; import io.github.springwolf.asyncapi.v3.bindings.MessageBinding; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import io.github.springwolf.asyncapi.v3.model.channel.message.MessageHeaders; @@ -11,15 +13,13 @@ import io.github.springwolf.asyncapi.v3.model.schema.MultiFormatSchema; import io.github.springwolf.asyncapi.v3.model.schema.SchemaReference; import io.github.springwolf.asyncapi.v3.model.server.Server; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaders; +import io.github.springwolf.core.asyncapi.scanners.ChannelsScanner; import io.github.springwolf.core.asyncapi.scanners.beans.BeanMethodsScanner; import io.github.springwolf.core.asyncapi.scanners.channels.ChannelMerger; -import io.github.springwolf.core.asyncapi.scanners.channels.ChannelsScanner; -import io.github.springwolf.core.asyncapi.types.channel.bindings.EmptyChannelBinding; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.bindings.EmptyMessageBinding; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaders; -import io.github.springwolf.core.configuration.AsyncApiDocket; -import io.github.springwolf.core.configuration.AsyncApiDocketService; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.configuration.docket.AsyncApiDocket; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.cloud.stream.config.BindingServiceProperties; diff --git a/springwolf-plugins/springwolf-cloud-stream-plugin/src/main/java/io/github/springwolf/plugins/cloudstream/scanners/channels/CloudStreamFunctionOperationsScanner.java b/springwolf-plugins/springwolf-cloud-stream-plugin/src/main/java/io/github/springwolf/plugins/cloudstream/scanners/channels/CloudStreamFunctionOperationsScanner.java index 04f367c63..1c922b175 100644 --- a/springwolf-plugins/springwolf-cloud-stream-plugin/src/main/java/io/github/springwolf/plugins/cloudstream/scanners/channels/CloudStreamFunctionOperationsScanner.java +++ b/springwolf-plugins/springwolf-cloud-stream-plugin/src/main/java/io/github/springwolf/plugins/cloudstream/scanners/channels/CloudStreamFunctionOperationsScanner.java @@ -1,6 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.cloudstream.scanners.channels; +import io.github.springwolf.asyncapi.v3.bindings.EmptyMessageBinding; +import io.github.springwolf.asyncapi.v3.bindings.EmptyOperationBinding; import io.github.springwolf.asyncapi.v3.bindings.MessageBinding; import io.github.springwolf.asyncapi.v3.bindings.OperationBinding; import io.github.springwolf.asyncapi.v3.model.channel.ChannelReference; @@ -11,15 +13,13 @@ import io.github.springwolf.asyncapi.v3.model.operation.Operation; import io.github.springwolf.asyncapi.v3.model.operation.OperationAction; import io.github.springwolf.asyncapi.v3.model.server.Server; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaders; +import io.github.springwolf.core.asyncapi.scanners.OperationsScanner; import io.github.springwolf.core.asyncapi.scanners.beans.BeanMethodsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.OperationMerger; -import io.github.springwolf.core.asyncapi.scanners.channels.OperationsScanner; -import io.github.springwolf.core.asyncapi.types.channel.operation.bindings.EmptyOperationBinding; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.bindings.EmptyMessageBinding; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaders; -import io.github.springwolf.core.configuration.AsyncApiDocket; -import io.github.springwolf.core.configuration.AsyncApiDocketService; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.operations.OperationMerger; +import io.github.springwolf.core.configuration.docket.AsyncApiDocket; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.cloud.stream.config.BindingServiceProperties; diff --git a/springwolf-plugins/springwolf-cloud-stream-plugin/src/main/java/io/github/springwolf/plugins/cloudstream/scanners/channels/FunctionalChannelBeanBuilder.java b/springwolf-plugins/springwolf-cloud-stream-plugin/src/main/java/io/github/springwolf/plugins/cloudstream/scanners/channels/FunctionalChannelBeanBuilder.java index 78d33d895..50d5dbf83 100644 --- a/springwolf-plugins/springwolf-cloud-stream-plugin/src/main/java/io/github/springwolf/plugins/cloudstream/scanners/channels/FunctionalChannelBeanBuilder.java +++ b/springwolf-plugins/springwolf-cloud-stream-plugin/src/main/java/io/github/springwolf/plugins/cloudstream/scanners/channels/FunctionalChannelBeanBuilder.java @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.cloudstream.scanners.channels; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; import lombok.RequiredArgsConstructor; import java.lang.reflect.Method; diff --git a/springwolf-plugins/springwolf-cloud-stream-plugin/src/test/java/io/github/springwolf/plugins/cloudstream/scanners/channels/CloudStreamFunctionChannelsScannerIntegrationTest.java b/springwolf-plugins/springwolf-cloud-stream-plugin/src/test/java/io/github/springwolf/plugins/cloudstream/scanners/channels/CloudStreamFunctionChannelsScannerIntegrationTest.java index 5da22f9a5..5ffba80e7 100644 --- a/springwolf-plugins/springwolf-cloud-stream-plugin/src/test/java/io/github/springwolf/plugins/cloudstream/scanners/channels/CloudStreamFunctionChannelsScannerIntegrationTest.java +++ b/springwolf-plugins/springwolf-cloud-stream-plugin/src/test/java/io/github/springwolf/plugins/cloudstream/scanners/channels/CloudStreamFunctionChannelsScannerIntegrationTest.java @@ -2,6 +2,9 @@ package io.github.springwolf.plugins.cloudstream.scanners.channels; import io.github.springwolf.asyncapi.v3.bindings.ChannelBinding; +import io.github.springwolf.asyncapi.v3.bindings.EmptyChannelBinding; +import io.github.springwolf.asyncapi.v3.bindings.EmptyMessageBinding; +import io.github.springwolf.asyncapi.v3.bindings.EmptyOperationBinding; import io.github.springwolf.asyncapi.v3.bindings.OperationBinding; import io.github.springwolf.asyncapi.v3.model.channel.ChannelObject; import io.github.springwolf.asyncapi.v3.model.channel.ChannelReference; @@ -13,22 +16,19 @@ import io.github.springwolf.asyncapi.v3.model.operation.OperationAction; import io.github.springwolf.asyncapi.v3.model.schema.MultiFormatSchema; import io.github.springwolf.asyncapi.v3.model.schema.SchemaReference; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.components.DefaultComponentsService; +import io.github.springwolf.core.asyncapi.components.SwaggerSchemaUtil; +import io.github.springwolf.core.asyncapi.components.examples.SchemaWalkerProvider; +import io.github.springwolf.core.asyncapi.components.examples.walkers.DefaultSchemaWalker; +import io.github.springwolf.core.asyncapi.components.examples.walkers.json.ExampleJsonValueGenerator; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaders; import io.github.springwolf.core.asyncapi.scanners.beans.DefaultBeanMethodsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; -import io.github.springwolf.core.asyncapi.scanners.classes.ComponentClassScanner; -import io.github.springwolf.core.asyncapi.scanners.classes.ConfigurationClassScanner; -import io.github.springwolf.core.asyncapi.types.channel.bindings.EmptyChannelBinding; -import io.github.springwolf.core.asyncapi.types.channel.operation.bindings.EmptyOperationBinding; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.bindings.EmptyMessageBinding; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaders; -import io.github.springwolf.core.configuration.DefaultAsyncApiDocketService; +import io.github.springwolf.core.asyncapi.scanners.classes.spring.ComponentClassScanner; +import io.github.springwolf.core.asyncapi.scanners.classes.spring.ConfigurationClassScanner; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.configuration.docket.DefaultAsyncApiDocketService; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; -import io.github.springwolf.core.schemas.ComponentsService; -import io.github.springwolf.core.schemas.DefaultComponentsService; -import io.github.springwolf.core.schemas.SwaggerSchemaUtil; -import io.github.springwolf.core.schemas.example.DefaultSchemaWalker; -import io.github.springwolf.core.schemas.example.ExampleJsonValueGenerator; -import io.github.springwolf.core.schemas.example.SchemaWalkerProvider; import org.apache.kafka.streams.kstream.KStream; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/springwolf-plugins/springwolf-cloud-stream-plugin/src/test/java/io/github/springwolf/plugins/cloudstream/scanners/channels/FunctionalChannelBeanBuilderTest.java b/springwolf-plugins/springwolf-cloud-stream-plugin/src/test/java/io/github/springwolf/plugins/cloudstream/scanners/channels/FunctionalChannelBeanBuilderTest.java index 109d26ade..973455174 100644 --- a/springwolf-plugins/springwolf-cloud-stream-plugin/src/test/java/io/github/springwolf/plugins/cloudstream/scanners/channels/FunctionalChannelBeanBuilderTest.java +++ b/springwolf-plugins/springwolf-cloud-stream-plugin/src/test/java/io/github/springwolf/plugins/cloudstream/scanners/channels/FunctionalChannelBeanBuilderTest.java @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.cloudstream.scanners.channels; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; import org.apache.kafka.streams.kstream.KStream; import org.assertj.core.api.Assertions; diff --git a/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/configuration/SpringwolfJmsProducerConfiguration.java b/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/configuration/SpringwolfJmsProducerConfiguration.java index 928b2080b..380a6f919 100644 --- a/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/configuration/SpringwolfJmsProducerConfiguration.java +++ b/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/configuration/SpringwolfJmsProducerConfiguration.java @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.jms.configuration; -import io.github.springwolf.core.asyncapi.controller.PublishingPayloadCreator; +import io.github.springwolf.core.controller.PublishingPayloadCreator; import io.github.springwolf.plugins.jms.controller.SpringwolfJmsController; import io.github.springwolf.plugins.jms.producer.SpringwolfJmsProducer; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; diff --git a/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/configuration/SpringwolfJmsScannerConfiguration.java b/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/configuration/SpringwolfJmsScannerConfiguration.java index d33acad5e..b801d3ab3 100644 --- a/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/configuration/SpringwolfJmsScannerConfiguration.java +++ b/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/configuration/SpringwolfJmsScannerConfiguration.java @@ -1,15 +1,15 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.jms.configuration; +import io.github.springwolf.core.asyncapi.components.ComponentsService; import io.github.springwolf.core.asyncapi.scanners.bindings.BindingProcessorPriority; import io.github.springwolf.core.asyncapi.scanners.channels.ChannelPriority; -import io.github.springwolf.core.asyncapi.scanners.channels.SimpleChannelsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.SimpleOperationsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.MethodLevelAnnotationChannelsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.MethodLevelAnnotationOperationsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.channels.SpringAnnotationChannelsScanner; +import io.github.springwolf.core.asyncapi.scanners.channels.annotations.SpringAnnotationMethodLevelChannelsScanner; import io.github.springwolf.core.asyncapi.scanners.classes.SpringwolfClassScanner; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.operations.SpringAnnotationOperationsScanner; +import io.github.springwolf.core.asyncapi.scanners.operations.annotations.SpringAnnotationMethodLevelOperationsScanner; import io.github.springwolf.plugins.jms.scanners.bindings.JmsBindingFactory; import io.github.springwolf.plugins.jms.scanners.bindings.processor.JmsMessageBindingProcessor; import io.github.springwolf.plugins.jms.scanners.bindings.processor.JmsOperationBindingProcessor; @@ -37,29 +37,31 @@ public JmsBindingFactory jmsBindingBuilder() { @Bean @ConditionalOnProperty(name = SPRINGWOLF_SCANNER_JMS_LISTENER_ENABLED, havingValue = "true", matchIfMissing = true) @Order(value = ChannelPriority.AUTO_DISCOVERED) - public SimpleChannelsScanner simpleJmsMethodLevelListenerAnnotationChannelsScanner( + public SpringAnnotationChannelsScanner simpleJmsMethodLevelListenerAnnotationChannelsScanner( SpringwolfClassScanner classScanner, JmsBindingFactory jmsBindingBuilder, PayloadClassExtractor payloadClassExtractor, ComponentsService componentsService) { - MethodLevelAnnotationChannelsScanner strategy = new MethodLevelAnnotationChannelsScanner<>( - JmsListener.class, jmsBindingBuilder, payloadClassExtractor, componentsService); + SpringAnnotationMethodLevelChannelsScanner strategy = + new SpringAnnotationMethodLevelChannelsScanner<>( + JmsListener.class, jmsBindingBuilder, payloadClassExtractor, componentsService); - return new SimpleChannelsScanner(classScanner, strategy); + return new SpringAnnotationChannelsScanner(classScanner, strategy); } @Bean @ConditionalOnProperty(name = SPRINGWOLF_SCANNER_JMS_LISTENER_ENABLED, havingValue = "true", matchIfMissing = true) @Order(value = ChannelPriority.AUTO_DISCOVERED) - public SimpleOperationsScanner simpleJmsMethodLevelListenerAnnotationOperationsScanner( + public SpringAnnotationOperationsScanner simpleJmsMethodLevelListenerAnnotationOperationsScanner( SpringwolfClassScanner classScanner, JmsBindingFactory jmsBindingBuilder, PayloadClassExtractor payloadClassExtractor, ComponentsService componentsService) { - MethodLevelAnnotationOperationsScanner strategy = new MethodLevelAnnotationOperationsScanner<>( - JmsListener.class, jmsBindingBuilder, payloadClassExtractor, componentsService); + SpringAnnotationMethodLevelOperationsScanner strategy = + new SpringAnnotationMethodLevelOperationsScanner<>( + JmsListener.class, jmsBindingBuilder, payloadClassExtractor, componentsService); - return new SimpleOperationsScanner(classScanner, strategy); + return new SpringAnnotationOperationsScanner(classScanner, strategy); } @Bean diff --git a/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/controller/SpringwolfJmsController.java b/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/controller/SpringwolfJmsController.java index e045b19a2..d60a12213 100644 --- a/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/controller/SpringwolfJmsController.java +++ b/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/controller/SpringwolfJmsController.java @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.jms.controller; -import io.github.springwolf.core.asyncapi.controller.PublishingBaseController; -import io.github.springwolf.core.asyncapi.controller.PublishingPayloadCreator; -import io.github.springwolf.core.asyncapi.controller.dtos.MessageDto; +import io.github.springwolf.core.controller.PublishingBaseController; +import io.github.springwolf.core.controller.PublishingPayloadCreator; +import io.github.springwolf.core.controller.dtos.MessageDto; import io.github.springwolf.plugins.jms.producer.SpringwolfJmsProducer; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/scanners/bindings/processor/JmsMessageBindingProcessor.java b/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/scanners/bindings/processor/JmsMessageBindingProcessor.java index 0dcae568f..dc426d3a4 100644 --- a/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/scanners/bindings/processor/JmsMessageBindingProcessor.java +++ b/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/scanners/bindings/processor/JmsMessageBindingProcessor.java @@ -2,8 +2,8 @@ package io.github.springwolf.plugins.jms.scanners.bindings.processor; import io.github.springwolf.asyncapi.v3.bindings.jms.JMSMessageBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.MessageBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedMessageBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.MessageBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.ProcessedMessageBinding; import io.github.springwolf.plugins.jms.scanners.channels.operationdata.annotation.JmsAsyncOperationBinding; import org.springframework.context.EmbeddedValueResolverAware; import org.springframework.util.StringValueResolver; diff --git a/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/scanners/bindings/processor/JmsOperationBindingProcessor.java b/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/scanners/bindings/processor/JmsOperationBindingProcessor.java index cb6bc43bb..f46b56bfa 100644 --- a/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/scanners/bindings/processor/JmsOperationBindingProcessor.java +++ b/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/scanners/bindings/processor/JmsOperationBindingProcessor.java @@ -2,8 +2,8 @@ package io.github.springwolf.plugins.jms.scanners.bindings.processor; import io.github.springwolf.asyncapi.v3.bindings.jms.JMSOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.processor.AbstractOperationBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.AbstractOperationBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.ProcessedOperationBinding; import io.github.springwolf.plugins.jms.scanners.channels.operationdata.annotation.JmsAsyncOperationBinding; public class JmsOperationBindingProcessor extends AbstractOperationBindingProcessor { diff --git a/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/scanners/channels/operationdata/annotation/JmsAsyncOperationBinding.java b/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/scanners/channels/operationdata/annotation/JmsAsyncOperationBinding.java index 40a868635..c16a6aa39 100644 --- a/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/scanners/channels/operationdata/annotation/JmsAsyncOperationBinding.java +++ b/springwolf-plugins/springwolf-jms-plugin/src/main/java/io/github/springwolf/plugins/jms/scanners/channels/operationdata/annotation/JmsAsyncOperationBinding.java @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.jms.scanners.channels.operationdata.annotation; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.AsyncOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncPublisher; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperationBinding; +import io.github.springwolf.core.asyncapi.annotations.AsyncPublisher; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/springwolf-plugins/springwolf-jms-plugin/src/test/java/io/github/springwolf/plugins/jms/configuration/SpringwolfJmsProducerConfigurationIntegrationTest.java b/springwolf-plugins/springwolf-jms-plugin/src/test/java/io/github/springwolf/plugins/jms/configuration/SpringwolfJmsProducerConfigurationIntegrationTest.java index b2d971a5e..4c7a80245 100644 --- a/springwolf-plugins/springwolf-jms-plugin/src/test/java/io/github/springwolf/plugins/jms/configuration/SpringwolfJmsProducerConfigurationIntegrationTest.java +++ b/springwolf-plugins/springwolf-jms-plugin/src/test/java/io/github/springwolf/plugins/jms/configuration/SpringwolfJmsProducerConfigurationIntegrationTest.java @@ -2,12 +2,12 @@ package io.github.springwolf.plugins.jms.configuration; import io.github.springwolf.core.asyncapi.AsyncApiService; -import io.github.springwolf.core.asyncapi.ChannelsService; -import io.github.springwolf.core.asyncapi.controller.PublishingPayloadCreator; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.channels.ChannelsService; +import io.github.springwolf.core.asyncapi.components.ComponentsService; import io.github.springwolf.core.asyncapi.scanners.classes.SpringwolfClassScanner; -import io.github.springwolf.core.configuration.AsyncApiDocketService; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; +import io.github.springwolf.core.controller.PublishingPayloadCreator; import io.github.springwolf.plugins.jms.controller.SpringwolfJmsController; import io.github.springwolf.plugins.jms.producer.SpringwolfJmsProducer; import org.junit.jupiter.api.Nested; diff --git a/springwolf-plugins/springwolf-jms-plugin/src/test/java/io/github/springwolf/plugins/jms/controller/SpringwolfJmsControllerIntegrationTest.java b/springwolf-plugins/springwolf-jms-plugin/src/test/java/io/github/springwolf/plugins/jms/controller/SpringwolfJmsControllerIntegrationTest.java index f5675760e..3dc624517 100644 --- a/springwolf-plugins/springwolf-jms-plugin/src/test/java/io/github/springwolf/plugins/jms/controller/SpringwolfJmsControllerIntegrationTest.java +++ b/springwolf-plugins/springwolf-jms-plugin/src/test/java/io/github/springwolf/plugins/jms/controller/SpringwolfJmsControllerIntegrationTest.java @@ -2,15 +2,15 @@ package io.github.springwolf.plugins.jms.controller; import com.fasterxml.jackson.annotation.JsonProperty; -import io.github.springwolf.core.asyncapi.controller.PublishingPayloadCreator; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.components.DefaultComponentsService; +import io.github.springwolf.core.asyncapi.components.SwaggerSchemaUtil; +import io.github.springwolf.core.asyncapi.components.examples.SchemaWalkerProvider; +import io.github.springwolf.core.asyncapi.components.examples.walkers.DefaultSchemaWalker; +import io.github.springwolf.core.asyncapi.components.examples.walkers.json.ExampleJsonValueGenerator; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; -import io.github.springwolf.core.schemas.ComponentsService; -import io.github.springwolf.core.schemas.DefaultComponentsService; -import io.github.springwolf.core.schemas.SwaggerSchemaUtil; -import io.github.springwolf.core.schemas.example.DefaultSchemaWalker; -import io.github.springwolf.core.schemas.example.ExampleJsonValueGenerator; -import io.github.springwolf.core.schemas.example.SchemaWalkerProvider; +import io.github.springwolf.core.controller.PublishingPayloadCreator; import io.github.springwolf.plugins.jms.producer.SpringwolfJmsProducer; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/springwolf-plugins/springwolf-jms-plugin/src/test/java/io/github/springwolf/plugins/jms/scanners/bindings/processor/JmsMessageBindingProcessorTest.java b/springwolf-plugins/springwolf-jms-plugin/src/test/java/io/github/springwolf/plugins/jms/scanners/bindings/processor/JmsMessageBindingProcessorTest.java index 8aadc18b7..a7deb61e3 100644 --- a/springwolf-plugins/springwolf-jms-plugin/src/test/java/io/github/springwolf/plugins/jms/scanners/bindings/processor/JmsMessageBindingProcessorTest.java +++ b/springwolf-plugins/springwolf-jms-plugin/src/test/java/io/github/springwolf/plugins/jms/scanners/bindings/processor/JmsMessageBindingProcessorTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.plugins.jms.scanners.bindings.processor; import io.github.springwolf.asyncapi.v3.bindings.jms.JMSMessageBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedMessageBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.ProcessedMessageBinding; import io.github.springwolf.plugins.jms.scanners.channels.operationdata.annotation.JmsAsyncOperationBinding; import org.junit.jupiter.api.Test; diff --git a/springwolf-plugins/springwolf-jms-plugin/src/test/java/io/github/springwolf/plugins/jms/scanners/bindings/processor/JmsOperationBindingProcessorTest.java b/springwolf-plugins/springwolf-jms-plugin/src/test/java/io/github/springwolf/plugins/jms/scanners/bindings/processor/JmsOperationBindingProcessorTest.java index ee7bfbd14..16c687954 100644 --- a/springwolf-plugins/springwolf-jms-plugin/src/test/java/io/github/springwolf/plugins/jms/scanners/bindings/processor/JmsOperationBindingProcessorTest.java +++ b/springwolf-plugins/springwolf-jms-plugin/src/test/java/io/github/springwolf/plugins/jms/scanners/bindings/processor/JmsOperationBindingProcessorTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.plugins.jms.scanners.bindings.processor; import io.github.springwolf.asyncapi.v3.bindings.jms.JMSOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedOperationBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.ProcessedOperationBinding; import io.github.springwolf.plugins.jms.scanners.channels.operationdata.annotation.JmsAsyncOperationBinding; import org.junit.jupiter.api.Test; diff --git a/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/configuration/SpringwolfKafkaProducerConfiguration.java b/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/configuration/SpringwolfKafkaProducerConfiguration.java index c8a91c2e5..0404f1ef4 100644 --- a/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/configuration/SpringwolfKafkaProducerConfiguration.java +++ b/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/configuration/SpringwolfKafkaProducerConfiguration.java @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.kafka.configuration; -import io.github.springwolf.core.asyncapi.controller.PublishingPayloadCreator; +import io.github.springwolf.core.controller.PublishingPayloadCreator; import io.github.springwolf.plugins.kafka.controller.SpringwolfKafkaController; import io.github.springwolf.plugins.kafka.producer.SpringwolfKafkaProducer; import io.github.springwolf.plugins.kafka.producer.SpringwolfKafkaTemplateFromProperties; diff --git a/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/configuration/SpringwolfKafkaScannerConfiguration.java b/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/configuration/SpringwolfKafkaScannerConfiguration.java index c83d50877..42932bc70 100644 --- a/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/configuration/SpringwolfKafkaScannerConfiguration.java +++ b/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/configuration/SpringwolfKafkaScannerConfiguration.java @@ -1,17 +1,17 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.kafka.configuration; +import io.github.springwolf.core.asyncapi.components.ComponentsService; import io.github.springwolf.core.asyncapi.scanners.bindings.BindingProcessorPriority; import io.github.springwolf.core.asyncapi.scanners.channels.ChannelPriority; -import io.github.springwolf.core.asyncapi.scanners.channels.SimpleChannelsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.SimpleOperationsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.ClassLevelAnnotationChannelsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.ClassLevelAnnotationOperationsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.MethodLevelAnnotationChannelsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.MethodLevelAnnotationOperationsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.channels.SpringAnnotationChannelsScanner; +import io.github.springwolf.core.asyncapi.scanners.channels.annotations.SpringAnnotationClassLevelChannelsScanner; +import io.github.springwolf.core.asyncapi.scanners.channels.annotations.SpringAnnotationMethodLevelChannelsScanner; import io.github.springwolf.core.asyncapi.scanners.classes.SpringwolfClassScanner; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.operations.SpringAnnotationOperationsScanner; +import io.github.springwolf.core.asyncapi.scanners.operations.annotations.SpringAnnotationClassLevelOperationsScanner; +import io.github.springwolf.core.asyncapi.scanners.operations.annotations.SpringAnnotationMethodLevelOperationsScanner; import io.github.springwolf.plugins.kafka.scanners.bindings.KafkaBindingFactory; import io.github.springwolf.plugins.kafka.scanners.bindings.processor.KafkaMessageBindingProcessor; import io.github.springwolf.plugins.kafka.scanners.bindings.processor.KafkaOperationBindingProcessor; @@ -56,14 +56,14 @@ public AsyncHeadersForKafkaBuilder kafkaAsyncHeadersBuilder() { havingValue = "true", matchIfMissing = true) @Order(value = ChannelPriority.AUTO_DISCOVERED) - public SimpleChannelsScanner simpleKafkaClassLevelListenerAnnotationChannelsScanner( + public SpringAnnotationChannelsScanner simpleKafkaClassLevelListenerAnnotationChannelsScanner( SpringwolfClassScanner classScanner, KafkaBindingFactory kafkaBindingBuilder, AsyncHeadersForKafkaBuilder asyncHeadersForKafkaBuilder, PayloadClassExtractor payloadClassExtractor, ComponentsService componentsService) { - ClassLevelAnnotationChannelsScanner strategy = - new ClassLevelAnnotationChannelsScanner<>( + SpringAnnotationClassLevelChannelsScanner strategy = + new SpringAnnotationClassLevelChannelsScanner<>( KafkaListener.class, KafkaHandler.class, kafkaBindingBuilder, @@ -71,7 +71,7 @@ public SimpleChannelsScanner simpleKafkaClassLevelListenerAnnotationChannelsScan payloadClassExtractor, componentsService); - return new SimpleChannelsScanner(classScanner, strategy); + return new SpringAnnotationChannelsScanner(classScanner, strategy); } @Bean @@ -80,14 +80,14 @@ public SimpleChannelsScanner simpleKafkaClassLevelListenerAnnotationChannelsScan havingValue = "true", matchIfMissing = true) @Order(value = ChannelPriority.AUTO_DISCOVERED) - public SimpleOperationsScanner simpleKafkaClassLevelListenerAnnotationOperationScanner( + public SpringAnnotationOperationsScanner simpleKafkaClassLevelListenerAnnotationOperationScanner( SpringwolfClassScanner classScanner, KafkaBindingFactory kafkaBindingBuilder, AsyncHeadersForKafkaBuilder asyncHeadersForKafkaBuilder, PayloadClassExtractor payloadClassExtractor, ComponentsService componentsService) { - ClassLevelAnnotationOperationsScanner strategy = - new ClassLevelAnnotationOperationsScanner<>( + SpringAnnotationClassLevelOperationsScanner strategy = + new SpringAnnotationClassLevelOperationsScanner<>( KafkaListener.class, KafkaHandler.class, kafkaBindingBuilder, @@ -95,7 +95,7 @@ public SimpleOperationsScanner simpleKafkaClassLevelListenerAnnotationOperationS payloadClassExtractor, componentsService); - return new SimpleOperationsScanner(classScanner, strategy); + return new SpringAnnotationOperationsScanner(classScanner, strategy); } @Bean @@ -104,15 +104,16 @@ public SimpleOperationsScanner simpleKafkaClassLevelListenerAnnotationOperationS havingValue = "true", matchIfMissing = true) @Order(value = ChannelPriority.AUTO_DISCOVERED) - public SimpleChannelsScanner simpleKafkaMethodLevelListenerAnnotationChannelsScanner( + public SpringAnnotationChannelsScanner simpleKafkaMethodLevelListenerAnnotationChannelsScanner( SpringwolfClassScanner classScanner, KafkaBindingFactory kafkaBindingBuilder, PayloadClassExtractor payloadClassExtractor, ComponentsService componentsService) { - MethodLevelAnnotationChannelsScanner strategy = new MethodLevelAnnotationChannelsScanner<>( - KafkaListener.class, kafkaBindingBuilder, payloadClassExtractor, componentsService); + SpringAnnotationMethodLevelChannelsScanner strategy = + new SpringAnnotationMethodLevelChannelsScanner<>( + KafkaListener.class, kafkaBindingBuilder, payloadClassExtractor, componentsService); - return new SimpleChannelsScanner(classScanner, strategy); + return new SpringAnnotationChannelsScanner(classScanner, strategy); } @Bean @@ -121,15 +122,16 @@ public SimpleChannelsScanner simpleKafkaMethodLevelListenerAnnotationChannelsSca havingValue = "true", matchIfMissing = true) @Order(value = ChannelPriority.AUTO_DISCOVERED) - public SimpleOperationsScanner simpleKafkaMethodLevelListenerAnnotationOperationsScanner( + public SpringAnnotationOperationsScanner simpleKafkaMethodLevelListenerAnnotationOperationsScanner( SpringwolfClassScanner classScanner, KafkaBindingFactory kafkaBindingBuilder, PayloadClassExtractor payloadClassExtractor, ComponentsService componentsService) { - MethodLevelAnnotationOperationsScanner strategy = new MethodLevelAnnotationOperationsScanner<>( - KafkaListener.class, kafkaBindingBuilder, payloadClassExtractor, componentsService); + SpringAnnotationMethodLevelOperationsScanner strategy = + new SpringAnnotationMethodLevelOperationsScanner<>( + KafkaListener.class, kafkaBindingBuilder, payloadClassExtractor, componentsService); - return new SimpleOperationsScanner(classScanner, strategy); + return new SpringAnnotationOperationsScanner(classScanner, strategy); } @Bean diff --git a/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/controller/SpringwolfKafkaController.java b/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/controller/SpringwolfKafkaController.java index 09a2f4ec8..4b3d11294 100644 --- a/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/controller/SpringwolfKafkaController.java +++ b/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/controller/SpringwolfKafkaController.java @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.kafka.controller; -import io.github.springwolf.core.asyncapi.controller.PublishingBaseController; -import io.github.springwolf.core.asyncapi.controller.PublishingPayloadCreator; -import io.github.springwolf.core.asyncapi.controller.dtos.MessageDto; +import io.github.springwolf.core.controller.PublishingBaseController; +import io.github.springwolf.core.controller.PublishingPayloadCreator; +import io.github.springwolf.core.controller.dtos.MessageDto; import io.github.springwolf.plugins.kafka.producer.SpringwolfKafkaProducer; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/scanners/bindings/processor/KafkaMessageBindingProcessor.java b/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/scanners/bindings/processor/KafkaMessageBindingProcessor.java index 49c838ee0..8ce032406 100644 --- a/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/scanners/bindings/processor/KafkaMessageBindingProcessor.java +++ b/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/scanners/bindings/processor/KafkaMessageBindingProcessor.java @@ -4,8 +4,8 @@ import io.github.springwolf.asyncapi.v3.bindings.kafka.KafkaMessageBinding; import io.github.springwolf.asyncapi.v3.model.schema.Schema; import io.github.springwolf.asyncapi.v3.model.schema.SchemaObject; -import io.github.springwolf.core.asyncapi.scanners.bindings.MessageBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedMessageBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.MessageBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.ProcessedMessageBinding; import io.github.springwolf.plugins.kafka.scanners.channels.operationdata.annotation.KafkaAsyncOperationBinding; import org.springframework.context.EmbeddedValueResolverAware; import org.springframework.util.StringUtils; diff --git a/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/scanners/bindings/processor/KafkaOperationBindingProcessor.java b/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/scanners/bindings/processor/KafkaOperationBindingProcessor.java index faf7db616..fc6e4888d 100644 --- a/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/scanners/bindings/processor/KafkaOperationBindingProcessor.java +++ b/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/scanners/bindings/processor/KafkaOperationBindingProcessor.java @@ -3,8 +3,8 @@ import io.github.springwolf.asyncapi.v3.bindings.kafka.KafkaOperationBinding; import io.github.springwolf.asyncapi.v3.model.schema.SchemaObject; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.processor.AbstractOperationBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.AbstractOperationBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.ProcessedOperationBinding; import io.github.springwolf.plugins.kafka.scanners.channels.annotation.KafkaListenerUtil; import io.github.springwolf.plugins.kafka.scanners.channels.operationdata.annotation.KafkaAsyncOperationBinding; import org.springframework.util.StringUtils; diff --git a/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/scanners/channels/operationdata/annotation/KafkaAsyncOperationBinding.java b/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/scanners/channels/operationdata/annotation/KafkaAsyncOperationBinding.java index 90707eff5..625eee147 100644 --- a/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/scanners/channels/operationdata/annotation/KafkaAsyncOperationBinding.java +++ b/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/scanners/channels/operationdata/annotation/KafkaAsyncOperationBinding.java @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.kafka.scanners.channels.operationdata.annotation; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.AsyncOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncPublisher; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperationBinding; +import io.github.springwolf.core.asyncapi.annotations.AsyncPublisher; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/types/channel/operation/message/header/AsyncHeadersForKafkaBuilder.java b/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/types/channel/operation/message/header/AsyncHeadersForKafkaBuilder.java index 185b2a4b9..3c42f0e2e 100644 --- a/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/types/channel/operation/message/header/AsyncHeadersForKafkaBuilder.java +++ b/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/types/channel/operation/message/header/AsyncHeadersForKafkaBuilder.java @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.kafka.types.channel.operation.message.header; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaders; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeadersBuilder; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaders; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeadersBuilder; public class AsyncHeadersForKafkaBuilder implements AsyncHeadersBuilder { @Override diff --git a/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/types/channel/operation/message/header/AsyncHeadersForSpringKafkaBuilder.java b/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/types/channel/operation/message/header/AsyncHeadersForSpringKafkaBuilder.java index 1950f4c3c..c85312164 100644 --- a/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/types/channel/operation/message/header/AsyncHeadersForSpringKafkaBuilder.java +++ b/springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/springwolf/plugins/kafka/types/channel/operation/message/header/AsyncHeadersForSpringKafkaBuilder.java @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.kafka.types.channel.operation.message.header; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaderSchema; -import io.github.springwolf.core.asyncapi.types.channel.operation.message.header.AsyncHeaders; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaderSchema; +import io.github.springwolf.core.asyncapi.components.headers.AsyncHeaders; import org.springframework.kafka.support.mapping.AbstractJavaTypeMapper; import java.util.List; diff --git a/springwolf-plugins/springwolf-kafka-plugin/src/test/java/io/github/springwolf/plugins/kafka/configuration/SpringwolfKafkaProducerConfigurationIntegrationTest.java b/springwolf-plugins/springwolf-kafka-plugin/src/test/java/io/github/springwolf/plugins/kafka/configuration/SpringwolfKafkaProducerConfigurationIntegrationTest.java index 0f08b5463..08eeb6542 100644 --- a/springwolf-plugins/springwolf-kafka-plugin/src/test/java/io/github/springwolf/plugins/kafka/configuration/SpringwolfKafkaProducerConfigurationIntegrationTest.java +++ b/springwolf-plugins/springwolf-kafka-plugin/src/test/java/io/github/springwolf/plugins/kafka/configuration/SpringwolfKafkaProducerConfigurationIntegrationTest.java @@ -1,11 +1,11 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.kafka.configuration; -import io.github.springwolf.core.asyncapi.controller.PublishingPayloadCreator; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.components.ComponentsService; import io.github.springwolf.core.asyncapi.scanners.classes.SpringwolfClassScanner; -import io.github.springwolf.core.configuration.AsyncApiDocketService; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; +import io.github.springwolf.core.controller.PublishingPayloadCreator; import io.github.springwolf.plugins.kafka.controller.SpringwolfKafkaController; import io.github.springwolf.plugins.kafka.producer.SpringwolfKafkaProducer; import org.junit.jupiter.api.Nested; diff --git a/springwolf-plugins/springwolf-kafka-plugin/src/test/java/io/github/springwolf/plugins/kafka/controller/SpringwolfKafkaControllerIntegrationTest.java b/springwolf-plugins/springwolf-kafka-plugin/src/test/java/io/github/springwolf/plugins/kafka/controller/SpringwolfKafkaControllerIntegrationTest.java index 1d3bd0b3b..b2d09c986 100644 --- a/springwolf-plugins/springwolf-kafka-plugin/src/test/java/io/github/springwolf/plugins/kafka/controller/SpringwolfKafkaControllerIntegrationTest.java +++ b/springwolf-plugins/springwolf-kafka-plugin/src/test/java/io/github/springwolf/plugins/kafka/controller/SpringwolfKafkaControllerIntegrationTest.java @@ -2,15 +2,15 @@ package io.github.springwolf.plugins.kafka.controller; import com.fasterxml.jackson.annotation.JsonProperty; -import io.github.springwolf.core.asyncapi.controller.PublishingPayloadCreator; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.components.ComponentsService; +import io.github.springwolf.core.asyncapi.components.DefaultComponentsService; +import io.github.springwolf.core.asyncapi.components.SwaggerSchemaUtil; +import io.github.springwolf.core.asyncapi.components.examples.SchemaWalkerProvider; +import io.github.springwolf.core.asyncapi.components.examples.walkers.DefaultSchemaWalker; +import io.github.springwolf.core.asyncapi.components.examples.walkers.json.ExampleJsonValueGenerator; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; import io.github.springwolf.core.configuration.properties.SpringwolfConfigProperties; -import io.github.springwolf.core.schemas.ComponentsService; -import io.github.springwolf.core.schemas.DefaultComponentsService; -import io.github.springwolf.core.schemas.SwaggerSchemaUtil; -import io.github.springwolf.core.schemas.example.DefaultSchemaWalker; -import io.github.springwolf.core.schemas.example.ExampleJsonValueGenerator; -import io.github.springwolf.core.schemas.example.SchemaWalkerProvider; +import io.github.springwolf.core.controller.PublishingPayloadCreator; import io.github.springwolf.plugins.kafka.producer.SpringwolfKafkaProducer; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/springwolf-plugins/springwolf-kafka-plugin/src/test/java/io/github/springwolf/plugins/kafka/scanners/bindings/processor/KafkaMessageBindingProcessorTest.java b/springwolf-plugins/springwolf-kafka-plugin/src/test/java/io/github/springwolf/plugins/kafka/scanners/bindings/processor/KafkaMessageBindingProcessorTest.java index 97e43acd7..a4381156a 100644 --- a/springwolf-plugins/springwolf-kafka-plugin/src/test/java/io/github/springwolf/plugins/kafka/scanners/bindings/processor/KafkaMessageBindingProcessorTest.java +++ b/springwolf-plugins/springwolf-kafka-plugin/src/test/java/io/github/springwolf/plugins/kafka/scanners/bindings/processor/KafkaMessageBindingProcessorTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.plugins.kafka.scanners.bindings.processor; import io.github.springwolf.asyncapi.v3.bindings.kafka.KafkaMessageBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedMessageBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.ProcessedMessageBinding; import io.github.springwolf.plugins.kafka.scanners.channels.operationdata.annotation.KafkaAsyncOperationBinding; import org.junit.jupiter.api.Test; diff --git a/springwolf-plugins/springwolf-kafka-plugin/src/test/java/io/github/springwolf/plugins/kafka/scanners/bindings/processor/KafkaOperationBindingProcessorTest.java b/springwolf-plugins/springwolf-kafka-plugin/src/test/java/io/github/springwolf/plugins/kafka/scanners/bindings/processor/KafkaOperationBindingProcessorTest.java index fc6d13d5e..262c0a6fe 100644 --- a/springwolf-plugins/springwolf-kafka-plugin/src/test/java/io/github/springwolf/plugins/kafka/scanners/bindings/processor/KafkaOperationBindingProcessorTest.java +++ b/springwolf-plugins/springwolf-kafka-plugin/src/test/java/io/github/springwolf/plugins/kafka/scanners/bindings/processor/KafkaOperationBindingProcessorTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.plugins.kafka.scanners.bindings.processor; import io.github.springwolf.asyncapi.v3.bindings.kafka.KafkaOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedOperationBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.ProcessedOperationBinding; import io.github.springwolf.plugins.kafka.scanners.channels.operationdata.annotation.KafkaAsyncOperationBinding; import org.junit.jupiter.api.Test; diff --git a/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/configuration/SpringwolfSnsProducerConfiguration.java b/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/configuration/SpringwolfSnsProducerConfiguration.java index 0efc881df..65a351139 100644 --- a/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/configuration/SpringwolfSnsProducerConfiguration.java +++ b/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/configuration/SpringwolfSnsProducerConfiguration.java @@ -2,7 +2,7 @@ package io.github.springwolf.plugins.sns.configuration; import io.awspring.cloud.sns.core.SnsTemplate; -import io.github.springwolf.core.asyncapi.controller.PublishingPayloadCreator; +import io.github.springwolf.core.controller.PublishingPayloadCreator; import io.github.springwolf.plugins.sns.controller.SpringwolfSnsController; import io.github.springwolf.plugins.sns.producer.SpringwolfSnsProducer; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; diff --git a/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/controller/SpringwolfSnsController.java b/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/controller/SpringwolfSnsController.java index 33fcd5bdf..0332337c6 100644 --- a/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/controller/SpringwolfSnsController.java +++ b/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/controller/SpringwolfSnsController.java @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.sns.controller; -import io.github.springwolf.core.asyncapi.controller.PublishingBaseController; -import io.github.springwolf.core.asyncapi.controller.PublishingPayloadCreator; -import io.github.springwolf.core.asyncapi.controller.dtos.MessageDto; +import io.github.springwolf.core.controller.PublishingBaseController; +import io.github.springwolf.core.controller.PublishingPayloadCreator; +import io.github.springwolf.core.controller.dtos.MessageDto; import io.github.springwolf.plugins.sns.producer.SpringwolfSnsProducer; import lombok.extern.slf4j.Slf4j; import org.springframework.messaging.support.MessageBuilder; diff --git a/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/SnsMessageBindingProcessor.java b/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/SnsMessageBindingProcessor.java index e1834f48d..1dce913a2 100644 --- a/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/SnsMessageBindingProcessor.java +++ b/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/SnsMessageBindingProcessor.java @@ -2,8 +2,8 @@ package io.github.springwolf.plugins.sns.scanners.channels.operationdata; import io.github.springwolf.asyncapi.v3.bindings.sns.SNSMessageBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.MessageBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedMessageBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.MessageBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.ProcessedMessageBinding; import io.github.springwolf.plugins.sns.scanners.channels.operationdata.annotation.SnsAsyncOperationBinding; import org.springframework.context.EmbeddedValueResolverAware; import org.springframework.util.StringValueResolver; diff --git a/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/SnsOperationBindingProcessor.java b/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/SnsOperationBindingProcessor.java index b9fd21579..ecac3fc22 100644 --- a/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/SnsOperationBindingProcessor.java +++ b/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/SnsOperationBindingProcessor.java @@ -4,8 +4,8 @@ import io.github.springwolf.asyncapi.v3.bindings.sns.SNSOperationBinding; import io.github.springwolf.asyncapi.v3.bindings.sns.SNSOperationBindingConsumer; import io.github.springwolf.asyncapi.v3.bindings.sns.SNSOperationBindingIdentifier; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.processor.AbstractOperationBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.AbstractOperationBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.ProcessedOperationBinding; import io.github.springwolf.plugins.sns.scanners.channels.operationdata.annotation.SnsAsyncOperationBinding; import io.github.springwolf.plugins.sns.scanners.channels.operationdata.annotation.SnsAsyncOperationBindingIdentifier; diff --git a/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/annotation/SnsAsyncOperationBinding.java b/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/annotation/SnsAsyncOperationBinding.java index cbdafb56c..5681013dc 100644 --- a/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/annotation/SnsAsyncOperationBinding.java +++ b/springwolf-plugins/springwolf-sns-plugin/src/main/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/annotation/SnsAsyncOperationBinding.java @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.sns.scanners.channels.operationdata.annotation; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.AsyncOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncPublisher; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperationBinding; +import io.github.springwolf.core.asyncapi.annotations.AsyncPublisher; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/springwolf-plugins/springwolf-sns-plugin/src/test/java/io/github/springwolf/plugins/sns/configuration/SpringwolfSnsProducerConfigurationIntegrationTest.java b/springwolf-plugins/springwolf-sns-plugin/src/test/java/io/github/springwolf/plugins/sns/configuration/SpringwolfSnsProducerConfigurationIntegrationTest.java index d60c73a66..e177e174d 100644 --- a/springwolf-plugins/springwolf-sns-plugin/src/test/java/io/github/springwolf/plugins/sns/configuration/SpringwolfSnsProducerConfigurationIntegrationTest.java +++ b/springwolf-plugins/springwolf-sns-plugin/src/test/java/io/github/springwolf/plugins/sns/configuration/SpringwolfSnsProducerConfigurationIntegrationTest.java @@ -3,12 +3,12 @@ import io.awspring.cloud.sns.core.SnsTemplate; import io.github.springwolf.core.asyncapi.AsyncApiService; -import io.github.springwolf.core.asyncapi.ChannelsService; -import io.github.springwolf.core.asyncapi.controller.PublishingPayloadCreator; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.channels.ChannelsService; +import io.github.springwolf.core.asyncapi.components.ComponentsService; import io.github.springwolf.core.asyncapi.scanners.classes.SpringwolfClassScanner; -import io.github.springwolf.core.configuration.AsyncApiDocketService; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; +import io.github.springwolf.core.controller.PublishingPayloadCreator; import io.github.springwolf.plugins.sns.controller.SpringwolfSnsController; import io.github.springwolf.plugins.sns.producer.SpringwolfSnsProducer; import org.junit.jupiter.api.Nested; diff --git a/springwolf-plugins/springwolf-sns-plugin/src/test/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/SnsMessageBindingProcessorTest.java b/springwolf-plugins/springwolf-sns-plugin/src/test/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/SnsMessageBindingProcessorTest.java index 3c3412494..12003bf22 100644 --- a/springwolf-plugins/springwolf-sns-plugin/src/test/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/SnsMessageBindingProcessorTest.java +++ b/springwolf-plugins/springwolf-sns-plugin/src/test/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/SnsMessageBindingProcessorTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.plugins.sns.scanners.channels.operationdata; import io.github.springwolf.asyncapi.v3.bindings.sns.SNSMessageBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedMessageBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.ProcessedMessageBinding; import io.github.springwolf.plugins.sns.scanners.channels.operationdata.annotation.SnsAsyncOperationBinding; import io.github.springwolf.plugins.sns.scanners.channels.operationdata.annotation.SnsAsyncOperationBindingIdentifier; import org.junit.jupiter.api.Test; diff --git a/springwolf-plugins/springwolf-sns-plugin/src/test/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/SnsOperationBindingProcessorTest.java b/springwolf-plugins/springwolf-sns-plugin/src/test/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/SnsOperationBindingProcessorTest.java index 8286772f2..416fd8380 100644 --- a/springwolf-plugins/springwolf-sns-plugin/src/test/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/SnsOperationBindingProcessorTest.java +++ b/springwolf-plugins/springwolf-sns-plugin/src/test/java/io/github/springwolf/plugins/sns/scanners/channels/operationdata/SnsOperationBindingProcessorTest.java @@ -4,7 +4,7 @@ import io.github.springwolf.asyncapi.v3.bindings.sns.SNSOperationBinding; import io.github.springwolf.asyncapi.v3.bindings.sns.SNSOperationBindingConsumer; import io.github.springwolf.asyncapi.v3.bindings.sns.SNSOperationBindingIdentifier; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedOperationBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.ProcessedOperationBinding; import io.github.springwolf.plugins.sns.scanners.channels.operationdata.annotation.SnsAsyncOperationBinding; import io.github.springwolf.plugins.sns.scanners.channels.operationdata.annotation.SnsAsyncOperationBindingIdentifier; import org.junit.jupiter.api.Test; diff --git a/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/configuration/SpringwolfSqsProducerConfiguration.java b/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/configuration/SpringwolfSqsProducerConfiguration.java index b294ce740..2c34fe1f8 100644 --- a/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/configuration/SpringwolfSqsProducerConfiguration.java +++ b/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/configuration/SpringwolfSqsProducerConfiguration.java @@ -2,7 +2,7 @@ package io.github.springwolf.plugins.sqs.configuration; import io.awspring.cloud.sqs.operations.SqsTemplate; -import io.github.springwolf.core.asyncapi.controller.PublishingPayloadCreator; +import io.github.springwolf.core.controller.PublishingPayloadCreator; import io.github.springwolf.plugins.sqs.controller.SpringwolfSqsController; import io.github.springwolf.plugins.sqs.producer.SpringwolfSqsProducer; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; diff --git a/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/configuration/SpringwolfSqsScannerConfiguration.java b/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/configuration/SpringwolfSqsScannerConfiguration.java index 8318c39fb..7264b181d 100644 --- a/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/configuration/SpringwolfSqsScannerConfiguration.java +++ b/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/configuration/SpringwolfSqsScannerConfiguration.java @@ -2,15 +2,15 @@ package io.github.springwolf.plugins.sqs.configuration; import io.awspring.cloud.sqs.annotation.SqsListener; +import io.github.springwolf.core.asyncapi.components.ComponentsService; import io.github.springwolf.core.asyncapi.scanners.bindings.BindingProcessorPriority; import io.github.springwolf.core.asyncapi.scanners.channels.ChannelPriority; -import io.github.springwolf.core.asyncapi.scanners.channels.SimpleChannelsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.SimpleOperationsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.MethodLevelAnnotationChannelsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.MethodLevelAnnotationOperationsScanner; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.channels.SpringAnnotationChannelsScanner; +import io.github.springwolf.core.asyncapi.scanners.channels.annotations.SpringAnnotationMethodLevelChannelsScanner; import io.github.springwolf.core.asyncapi.scanners.classes.SpringwolfClassScanner; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.scanners.operations.SpringAnnotationOperationsScanner; +import io.github.springwolf.core.asyncapi.scanners.operations.annotations.SpringAnnotationMethodLevelOperationsScanner; import io.github.springwolf.plugins.sqs.scanners.bindings.SqsBindingFactory; import io.github.springwolf.plugins.sqs.scanners.bindings.processor.SqsMessageBindingProcessor; import io.github.springwolf.plugins.sqs.scanners.bindings.processor.SqsOperationBindingProcessor; @@ -37,29 +37,31 @@ public SqsBindingFactory sqsBindingBuilder() { @Bean @ConditionalOnProperty(name = SPRINGWOLF_SCANNER_SQS_LISTENER_ENABLED, havingValue = "true", matchIfMissing = true) @Order(value = ChannelPriority.AUTO_DISCOVERED) - public SimpleChannelsScanner simpleSqsMethodLevelListenerAnnotationChannelsScanner( + public SpringAnnotationChannelsScanner simpleSqsMethodLevelListenerAnnotationChannelsScanner( SpringwolfClassScanner classScanner, SqsBindingFactory sqsBindingBuilder, PayloadClassExtractor payloadClassExtractor, ComponentsService componentsService) { - MethodLevelAnnotationChannelsScanner strategy = new MethodLevelAnnotationChannelsScanner<>( - SqsListener.class, sqsBindingBuilder, payloadClassExtractor, componentsService); + SpringAnnotationMethodLevelChannelsScanner strategy = + new SpringAnnotationMethodLevelChannelsScanner<>( + SqsListener.class, sqsBindingBuilder, payloadClassExtractor, componentsService); - return new SimpleChannelsScanner(classScanner, strategy); + return new SpringAnnotationChannelsScanner(classScanner, strategy); } @Bean @ConditionalOnProperty(name = SPRINGWOLF_SCANNER_SQS_LISTENER_ENABLED, havingValue = "true", matchIfMissing = true) @Order(value = ChannelPriority.AUTO_DISCOVERED) - public SimpleOperationsScanner simpleSqsMethodLevelListenerAnnotationOperationsScanner( + public SpringAnnotationOperationsScanner simpleSqsMethodLevelListenerAnnotationOperationsScanner( SpringwolfClassScanner classScanner, SqsBindingFactory sqsBindingBuilder, PayloadClassExtractor payloadClassExtractor, ComponentsService componentsService) { - MethodLevelAnnotationOperationsScanner strategy = new MethodLevelAnnotationOperationsScanner<>( - SqsListener.class, sqsBindingBuilder, payloadClassExtractor, componentsService); + SpringAnnotationMethodLevelOperationsScanner strategy = + new SpringAnnotationMethodLevelOperationsScanner<>( + SqsListener.class, sqsBindingBuilder, payloadClassExtractor, componentsService); - return new SimpleOperationsScanner(classScanner, strategy); + return new SpringAnnotationOperationsScanner(classScanner, strategy); } @Bean diff --git a/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/controller/SpringwolfSqsController.java b/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/controller/SpringwolfSqsController.java index ef0679a97..42b4c4f05 100644 --- a/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/controller/SpringwolfSqsController.java +++ b/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/controller/SpringwolfSqsController.java @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.sqs.controller; -import io.github.springwolf.core.asyncapi.controller.PublishingBaseController; -import io.github.springwolf.core.asyncapi.controller.PublishingPayloadCreator; -import io.github.springwolf.core.asyncapi.controller.dtos.MessageDto; +import io.github.springwolf.core.controller.PublishingBaseController; +import io.github.springwolf.core.controller.PublishingPayloadCreator; +import io.github.springwolf.core.controller.dtos.MessageDto; import io.github.springwolf.plugins.sqs.producer.SpringwolfSqsProducer; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/scanners/bindings/processor/SqsMessageBindingProcessor.java b/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/scanners/bindings/processor/SqsMessageBindingProcessor.java index f203f4153..bfae29ca3 100644 --- a/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/scanners/bindings/processor/SqsMessageBindingProcessor.java +++ b/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/scanners/bindings/processor/SqsMessageBindingProcessor.java @@ -2,8 +2,8 @@ package io.github.springwolf.plugins.sqs.scanners.bindings.processor; import io.github.springwolf.asyncapi.v3.bindings.sqs.SQSMessageBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.MessageBindingProcessor; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedMessageBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.MessageBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.ProcessedMessageBinding; import io.github.springwolf.plugins.sqs.scanners.channels.operationdata.annotation.SqsAsyncOperationBinding; import org.springframework.context.EmbeddedValueResolverAware; import org.springframework.util.StringValueResolver; diff --git a/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/scanners/bindings/processor/SqsOperationBindingProcessor.java b/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/scanners/bindings/processor/SqsOperationBindingProcessor.java index 8f81692fe..1bec9d401 100644 --- a/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/scanners/bindings/processor/SqsOperationBindingProcessor.java +++ b/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/scanners/bindings/processor/SqsOperationBindingProcessor.java @@ -3,8 +3,8 @@ import io.github.springwolf.asyncapi.v3.bindings.sqs.SQSChannelBindingQueue; import io.github.springwolf.asyncapi.v3.bindings.sqs.SQSOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.processor.AbstractOperationBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.AbstractOperationBindingProcessor; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.ProcessedOperationBinding; import io.github.springwolf.plugins.sqs.scanners.channels.operationdata.annotation.SqsAsyncOperationBinding; import io.github.springwolf.plugins.sqs.scanners.channels.operationdata.annotation.SqsAsyncQueueBinding; diff --git a/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/scanners/channels/operationdata/annotation/SqsAsyncOperationBinding.java b/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/scanners/channels/operationdata/annotation/SqsAsyncOperationBinding.java index 059508f84..805a72d9d 100644 --- a/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/scanners/channels/operationdata/annotation/SqsAsyncOperationBinding.java +++ b/springwolf-plugins/springwolf-sqs-plugin/src/main/java/io/github/springwolf/plugins/sqs/scanners/channels/operationdata/annotation/SqsAsyncOperationBinding.java @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 package io.github.springwolf.plugins.sqs.scanners.channels.operationdata.annotation; -import io.github.springwolf.core.asyncapi.scanners.channels.annotation.AsyncOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncListener; -import io.github.springwolf.core.asyncapi.scanners.channels.operationdata.annotation.AsyncPublisher; +import io.github.springwolf.core.asyncapi.annotations.AsyncListener; +import io.github.springwolf.core.asyncapi.annotations.AsyncOperationBinding; +import io.github.springwolf.core.asyncapi.annotations.AsyncPublisher; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/springwolf-plugins/springwolf-sqs-plugin/src/test/java/io/github/springwolf/plugins/sqs/configuration/SpringwolfSqsProducerConfigurationIntegrationTest.java b/springwolf-plugins/springwolf-sqs-plugin/src/test/java/io/github/springwolf/plugins/sqs/configuration/SpringwolfSqsProducerConfigurationIntegrationTest.java index 3413763cc..04ab4c6c2 100644 --- a/springwolf-plugins/springwolf-sqs-plugin/src/test/java/io/github/springwolf/plugins/sqs/configuration/SpringwolfSqsProducerConfigurationIntegrationTest.java +++ b/springwolf-plugins/springwolf-sqs-plugin/src/test/java/io/github/springwolf/plugins/sqs/configuration/SpringwolfSqsProducerConfigurationIntegrationTest.java @@ -3,12 +3,12 @@ import io.awspring.cloud.sqs.operations.SqsTemplate; import io.github.springwolf.core.asyncapi.AsyncApiService; -import io.github.springwolf.core.asyncapi.ChannelsService; -import io.github.springwolf.core.asyncapi.controller.PublishingPayloadCreator; -import io.github.springwolf.core.asyncapi.scanners.channels.payload.PayloadClassExtractor; +import io.github.springwolf.core.asyncapi.channels.ChannelsService; +import io.github.springwolf.core.asyncapi.components.ComponentsService; import io.github.springwolf.core.asyncapi.scanners.classes.SpringwolfClassScanner; -import io.github.springwolf.core.configuration.AsyncApiDocketService; -import io.github.springwolf.core.schemas.ComponentsService; +import io.github.springwolf.core.asyncapi.scanners.common.payload.PayloadClassExtractor; +import io.github.springwolf.core.configuration.docket.AsyncApiDocketService; +import io.github.springwolf.core.controller.PublishingPayloadCreator; import io.github.springwolf.plugins.sqs.controller.SpringwolfSqsController; import io.github.springwolf.plugins.sqs.producer.SpringwolfSqsProducer; import org.junit.jupiter.api.Nested; diff --git a/springwolf-plugins/springwolf-sqs-plugin/src/test/java/io/github/springwolf/plugins/sqs/scanners/bindings/processor/SqsMessageBindingProcessorTest.java b/springwolf-plugins/springwolf-sqs-plugin/src/test/java/io/github/springwolf/plugins/sqs/scanners/bindings/processor/SqsMessageBindingProcessorTest.java index e190f10e7..b82614c07 100644 --- a/springwolf-plugins/springwolf-sqs-plugin/src/test/java/io/github/springwolf/plugins/sqs/scanners/bindings/processor/SqsMessageBindingProcessorTest.java +++ b/springwolf-plugins/springwolf-sqs-plugin/src/test/java/io/github/springwolf/plugins/sqs/scanners/bindings/processor/SqsMessageBindingProcessorTest.java @@ -2,7 +2,7 @@ package io.github.springwolf.plugins.sqs.scanners.bindings.processor; import io.github.springwolf.asyncapi.v3.bindings.sqs.SQSMessageBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedMessageBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.messages.ProcessedMessageBinding; import io.github.springwolf.plugins.sqs.scanners.channels.operationdata.annotation.SqsAsyncOperationBinding; import org.junit.jupiter.api.Test; diff --git a/springwolf-plugins/springwolf-sqs-plugin/src/test/java/io/github/springwolf/plugins/sqs/scanners/bindings/processor/SqsOperationBindingProcessorTest.java b/springwolf-plugins/springwolf-sqs-plugin/src/test/java/io/github/springwolf/plugins/sqs/scanners/bindings/processor/SqsOperationBindingProcessorTest.java index 087f6d168..b5680b566 100644 --- a/springwolf-plugins/springwolf-sqs-plugin/src/test/java/io/github/springwolf/plugins/sqs/scanners/bindings/processor/SqsOperationBindingProcessorTest.java +++ b/springwolf-plugins/springwolf-sqs-plugin/src/test/java/io/github/springwolf/plugins/sqs/scanners/bindings/processor/SqsOperationBindingProcessorTest.java @@ -3,7 +3,7 @@ import io.github.springwolf.asyncapi.v3.bindings.sqs.SQSChannelBindingQueue; import io.github.springwolf.asyncapi.v3.bindings.sqs.SQSOperationBinding; -import io.github.springwolf.core.asyncapi.scanners.bindings.ProcessedOperationBinding; +import io.github.springwolf.core.asyncapi.scanners.bindings.operations.ProcessedOperationBinding; import io.github.springwolf.plugins.sqs.scanners.channels.operationdata.annotation.SqsAsyncOperationBinding; import io.github.springwolf.plugins.sqs.scanners.channels.operationdata.annotation.SqsAsyncQueueBinding; import org.junit.jupiter.api.Test;