Skip to content

Commit

Permalink
re-apply original commit "chore: remove deprecated asyncapidocket bean (
Browse files Browse the repository at this point in the history
#524)"

This reverts commit b03008f.
  • Loading branch information
timonback committed Jan 19, 2024
1 parent c86eb1b commit 5d899d6
Show file tree
Hide file tree
Showing 23 changed files with 152 additions and 1,337 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import io.github.stavshamir.springwolf.asyncapi.SpringwolfInitApplicationListener;
import io.github.stavshamir.springwolf.asyncapi.scanners.channels.ChannelsScanner;
import io.github.stavshamir.springwolf.asyncapi.scanners.channels.payload.PayloadClassExtractor;
import io.github.stavshamir.springwolf.configuration.AsyncApiDocket;
import io.github.stavshamir.springwolf.configuration.AsyncApiDocketService;
import io.github.stavshamir.springwolf.configuration.DefaultAsyncApiDocketService;
import io.github.stavshamir.springwolf.configuration.properties.SpringwolfConfigConstants;
Expand All @@ -31,7 +30,6 @@
import org.springframework.core.annotation.Order;

import java.util.List;
import java.util.Optional;

/**
* Spring Boot auto-configuration which loads all spring-beans for springwolf core module.
Expand Down Expand Up @@ -82,9 +80,8 @@ public SchemasService schemasService(

@Bean
@ConditionalOnMissingBean
public AsyncApiDocketService asyncApiDocketService(
Optional<AsyncApiDocket> optionalAsyncApiDocket, SpringwolfConfigProperties springwolfConfigProperties) {
return new DefaultAsyncApiDocketService(optionalAsyncApiDocket, springwolfConfigProperties);
public AsyncApiDocketService asyncApiDocketService(SpringwolfConfigProperties springwolfConfigProperties) {
return new DefaultAsyncApiDocketService(springwolfConfigProperties);
}

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import io.github.stavshamir.springwolf.asyncapi.scanners.bindings.OperationBindingProcessor;
import io.github.stavshamir.springwolf.asyncapi.scanners.channels.ChannelPriority;
import io.github.stavshamir.springwolf.asyncapi.scanners.channels.annotation.AsyncAnnotationChannelsScanner;
import io.github.stavshamir.springwolf.asyncapi.scanners.channels.operationdata.ConsumerOperationDataScanner;
import io.github.stavshamir.springwolf.asyncapi.scanners.channels.operationdata.ProducerOperationDataScanner;
import io.github.stavshamir.springwolf.asyncapi.scanners.channels.operationdata.annotation.AsyncListener;
import io.github.stavshamir.springwolf.asyncapi.scanners.channels.operationdata.annotation.AsyncOperation;
import io.github.stavshamir.springwolf.asyncapi.scanners.channels.operationdata.annotation.AsyncPublisher;
Expand All @@ -30,8 +28,6 @@

import static io.github.stavshamir.springwolf.configuration.properties.SpringwolfConfigConstants.SPRINGWOLF_SCANNER_ASYNC_LISTENER_ENABLED;
import static io.github.stavshamir.springwolf.configuration.properties.SpringwolfConfigConstants.SPRINGWOLF_SCANNER_ASYNC_PUBLISHER_ENABLED;
import static io.github.stavshamir.springwolf.configuration.properties.SpringwolfConfigConstants.SPRINGWOLF_SCANNER_CONSUMER_DATA_ENABLED;
import static io.github.stavshamir.springwolf.configuration.properties.SpringwolfConfigConstants.SPRINGWOLF_SCANNER_PRODUCER_DATA_ENABLED;

/**
* Spring configuration defining the core scanner beans.
Expand Down Expand Up @@ -65,22 +61,6 @@ public SpringwolfClassScanner springwolfClassScanner(
return new SpringwolfClassScanner(componentClassScanner, beanMethodsScanner);
}

@Bean
@ConditionalOnProperty(name = SPRINGWOLF_SCANNER_CONSUMER_DATA_ENABLED, havingValue = "true", matchIfMissing = true)
@Order(value = ChannelPriority.MANUAL_DEFINED)
public ConsumerOperationDataScanner consumerOperationDataScanner(
AsyncApiDocketService asyncApiDocketService, SchemasService schemasService) {
return new ConsumerOperationDataScanner(asyncApiDocketService, schemasService);
}

@Bean
@ConditionalOnProperty(name = SPRINGWOLF_SCANNER_PRODUCER_DATA_ENABLED, havingValue = "true", matchIfMissing = true)
@Order(value = ChannelPriority.MANUAL_DEFINED)
public ProducerOperationDataScanner producerOperationDataScanner(
AsyncApiDocketService asyncApiDocketService, SchemasService schemasService) {
return new ProducerOperationDataScanner(asyncApiDocketService, schemasService);
}

@Bean
@ConditionalOnProperty(
name = SPRINGWOLF_SCANNER_ASYNC_LISTENER_ENABLED,
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5d899d6

Please sign in to comment.