You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/behind-the-scenes.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,8 +33,9 @@ The `ChannelItem` contains the `Message` for the subscribe and/or publish operat
33
33
When the scanners scan and build the result, they also extract the payload type.
34
34
The payload is registered in the `SchemasService`, which allows to split the `Message` from the schema definition - within the AsyncAPI doc a `$ref` references is used.
35
35
36
-
Using `swagger-inflector` any class can be converted into a OpenApi schema.
37
-
This is used to instantiate an Example object with default values and serialized into an example JSON for the AsyncApi document.
36
+
Using `swagger-core` any class can be converted into a OpenApi schema.
37
+
The schema is used in the AsyncApi document.
38
+
Additionally, Springwolf generates an example JSON based on the provided schema.
38
39
39
40
By using `swagger-parser`, all the `@Schema` and other swagger annotations are supported as well as `@JsonProperty` through the use of the objectmapper.
|`springwolf.enabled`|`true`| Allows to enable/disable Springwolf at one central place. |
65
-
|`springwolf.init-mode`|`fail_fast`| Springwolf initializes during start up with `fail_fast` or in the `background` after the application has started. |
66
-
|`springwolf.paths.docs`|`/springwolf/docs`| The path of the AsyncAPI document in JSON format. *Note that at the moment the UI will work only with the default value.*|
67
-
|`springwolf.endpoint.actuator.enabled`|`false`| Publish the AsyncAPI document as part of Spring Boot’s actuator feature. |
68
-
|`springwolf.use-fqn`|`false`| Use fully qualified names for the schema classes. It's recommended and required for publishing, but deactivated due to backwards compatibility |
69
-
|`springwolf.scanner.consumer-data.enabled`|`true`| Enable scanner to find consumers defined in `AsyncApiDocket`. |
70
-
|`springwolf.scanner.producer-data.enabled`|`true`| Enable scanner to find producers defined in `AsyncApiDocket`. |
71
-
|`springwolf.scanner.async-listener.enabled`|`true`| Enable scanner to find methods annotated with `@AsyncListener`. |
72
-
|`springwolf.scanner.async-publisher.enabled`|`true`| Enable scanner to find methods annotated with `@AsyncPublisher`. |
73
-
|**AMQP**|||
74
-
|`springwolf.plugin.amqp.publishing.enabled`|`false`| Allow (anyone) to produce AMQP messages from the UI. *Note that this has security implications*|
75
-
|`springwolf.plugin.amqp.scanner.rabbit-listener.enabled`|`true`| Enable scanner to find methods annotated with `@RabbitListener`. |
76
-
|**Kafka**|||
77
-
|`springwolf.plugin.kafka.publishing.enabled`|`false`| Allow (anyone) to produce Kafka messages from the UI. *Note that this has security implications*|
78
-
|`springwolf.plugin.kafka.publishing.producer`|`null`| Configure the Kafka producer used to publish messages from the UI. Uses identical parameters as `spring.kafka.producer`|
79
-
|`springwolf.plugin.kafka.scanner.kafka-listener.enabled`|`true`| Enable scanner to find methods annotated with `@KafkaListener`. |
80
-
|**SNS**|||
81
-
|`springwolf.plugin.sns.publishing.enabled`|`false`| Allow (anyone) to produce SNS messages from the UI. *Note that this has security implications*|
82
-
|**SQS**|||
83
-
|`springwolf.plugin.sqs.publishing.enabled`|`false`| Allow (anyone) to produce SQS messages from the UI. *Note that this has security implications*|
84
-
|`springwolf.plugin.sqs.scanner.sqs-listener.enabled`|`true`| Enable scanner to find methods annotated with `@SqsListener`. |
|`springwolf.enabled`|`true`| Allows to enable/disable Springwolf at one central place. |
65
+
|`springwolf.init-mode`|`fail_fast`| Springwolf initializes during start up with `fail_fast` or in the `background` after the application has started. |
66
+
|`springwolf.paths.docs`|`/springwolf/docs`| The path of the AsyncAPI document in JSON format. *Note that at the moment the UI will work only with the default value.*|
67
+
|`springwolf.endpoint.actuator.enabled`|`false`| Publish the AsyncAPI document as part of Spring Boot’s actuator feature. |
68
+
|`springwolf.use-fqn`|`false`| Use fully qualified names for the schema classes. It's recommended and **required for publishing**, but deactivated due to backwards compatibility |
69
+
|`springwolf.scanner.consumer-data.enabled`|`true`| Enable scanner to find consumers defined in `AsyncApiDocket`. |
70
+
|`springwolf.scanner.producer-data.enabled`|`true`| Enable scanner to find producers defined in `AsyncApiDocket`. |
71
+
|`springwolf.scanner.async-listener.enabled`|`true`| Enable scanner to find methods annotated with `@AsyncListener`. |
72
+
|`springwolf.scanner.async-publisher.enabled`|`true`| Enable scanner to find methods annotated with `@AsyncPublisher`. |
73
+
|**AMQP**|||
74
+
|`springwolf.plugin.amqp.publishing.enabled`|`false`| Allow (anyone) to produce AMQP messages from the UI. *Note that this has security implications*|
75
+
|`springwolf.plugin.amqp.scanner.rabbit-listener.enabled`|`true`| Enable scanner to find methods annotated with `@RabbitListener`. |
76
+
|**Kafka**|||
77
+
|`springwolf.plugin.kafka.publishing.enabled`|`false`| Allow (anyone) to produce Kafka messages from the UI. *Note that this has security implications*|
78
+
|`springwolf.plugin.kafka.publishing.producer`|`null`| Configure the Kafka producer used to publish messages from the UI. Uses identical parameters as `spring.kafka.producer`|
79
+
|`springwolf.plugin.kafka.scanner.kafka-listener.enabled`|`true`| Enable scanner to find methods annotated with `@KafkaListener`. |
80
+
|**SNS**|||
81
+
|`springwolf.plugin.sns.publishing.enabled`|`false`| Allow (anyone) to produce SNS messages from the UI. *Note that this has security implications*|
82
+
|**SQS**|||
83
+
|`springwolf.plugin.sqs.publishing.enabled`|`false`| Allow (anyone) to produce SQS messages from the UI. *Note that this has security implications*|
84
+
|`springwolf.plugin.sqs.scanner.sqs-listener.enabled`|`true`| Enable scanner to find methods annotated with `@SqsListener`. |
Copy file name to clipboardExpand all lines: docs/configuration/documenting-consumers.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ For these use-cases, Springwolf provides additional ways to explicitly add them
11
11
12
12
To document consumers, either:
13
13
- add the `@AsyncListener` annotation or
14
-
- declare the `ConsumerData` object as part of the `AsyncApiDocket` or
14
+
-(deprecated) declare the `ConsumerData` object as part of the `AsyncApiDocket` or
15
15
- rely on the auto-detection of `@KafkaListener`, `@RabbitListener`, `@SqsListener`
16
16
17
17
You are free to use all options together. Per channel and operation, first `ConsumerData` is used, then `@AsyncListener` and last the auto-detected annotations.
@@ -21,7 +21,7 @@ You are free to use all options together. Per channel and operation, first `Cons
21
21
The `@AsyncListener` annotation is added to the method of the listeners and extracts the payload from its arguments.
22
22
Additional fields can be documented.
23
23
24
-
The protocol operation binding is configured via `@AmqpAsyncOperationBinding`or `@KafkaAsyncOperationBinding`, which has to be on the same method.
24
+
The protocol operation binding is configured via `@AmqpAsyncOperationBinding`, `@KafkaAsyncOperationBinding`or `@AsyncGenericOperationBinding`, which has to be on the same method.
25
25
26
26
Below is an example to demonstrate the annotation:
Copy file name to clipboardExpand all lines: docs/configuration/documenting-producers.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Because producers are also an important part of AsyncAPI, Springwolf provides a
10
10
11
11
To document producers, either:
12
12
- add the `@AsyncPublisher` annotation or
13
-
- declare the `ProducerData` object as part of the `AsyncApiDocket`
13
+
-(deprecated) declare the `ProducerData` object as part of the `AsyncApiDocket`
14
14
15
15
You are free to use all options together. Per channel and operation, first `ProducerData` is used, then `@AsyncPublisher`.
16
16
@@ -19,7 +19,7 @@ You are free to use all options together. Per channel and operation, first `Prod
19
19
The `@AsyncPublisher` annotation is added to the method of the publisher and extracts the payload from its arguments.
20
20
Additional fields can be documented.
21
21
22
-
The protocol operation binding is configured via `@AmqpAsyncOperationBinding`or `@KafkaAsyncOperationBinding`, which has to be on the same method.
22
+
The protocol operation binding is configured via `@AmqpAsyncOperationBinding`, `@KafkaAsyncOperationBinding`or `@AsyncGenericOperationBinding`, which has to be on the same method.
23
23
24
24
Below is an example to demonstrate the annotation:
Copy file name to clipboardExpand all lines: docs/faq.md
+22-10Lines changed: 22 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,9 +49,31 @@ Publishing messages from the UI is disabled by default due to security concerns.
49
49
Springwolf doesn't offer authentication nor authorization, anyone can publish messages to (production) channels.
50
50
51
51
Check the [configuration](configuration/configuration.md) to enable this feature.
52
+
Be sure to enable fully qualified names ([`use-fqn`](configuration/configuration.md)) as well.
52
53
53
54
Spring Security allows to limit access to authorized users.
54
55
56
+
### Consumers are detected multiple times (with different payloads)
57
+
58
+
When Springwolf finds multiple consumers/producers for the same channel/topic, these are merged together.
59
+
This is expected, as there are use-cases where different payloads are sent via the same channel/topic.
60
+
61
+
Springwolf uses on scanners to find all consumer and producers in your application.
62
+
Most likely two scanners found your consumer/producer each.
63
+
See [configuration](configuration/configuration.md) to disable scanners.
64
+
65
+
### Only one of multiple classes with the same name (different package) is detected
66
+
67
+
Enable the fully qualified class name (FQN) option (`springwolf.use-fqn=true`) so that Springwolf uses the FQN internally.
68
+
69
+
### How to migrate from the deprecated `AsyncApiDocket` bean to Spring properties
70
+
71
+
1. `consumers` and/or `producers` defined in the `AsyncApiDocket` have to be converted to the `@AsyncListener` and/or `@AsyncPublisher` annotation approach.
72
+
See the [Consumers](configuration/documenting-consumers.md) and [Producers](configuration/documenting-producers.md) page on how to map the properties.
73
+
2. Map all entries of the docket to its Spring properties equivalent.
74
+
The Spring properties equivalent start with `springwolf.docket.`.
75
+
Example: The title within the info object is `springwolf.docket.info.title=my title`
76
+
55
77
### Is Spring Boot 2.X supported
56
78
57
79
You can use an older version of Springwolf, which is build to support Spring Boot 2.X.
@@ -93,13 +115,3 @@ from the given `apiDocsUrl` and store it in the `outputDir` and with the given `
93
115
94
116
If your application is unable to start up with the `bootRun` task, see if [customBootRun](https://github.com/springdoc/springdoc-openapi-gradle-plugin#customization)
95
117
properties can help you.
96
-
97
-
### Consumers are detected multiple times (with different payloads)
98
-
99
-
WhenSpringwolf finds multiple consumers/producers for the same channel/topic, these are merged together.
100
-
This is expected, as there are use-cases where different payloads are sent via the same channel/topic.
101
-
102
-
Springwolf uses on scanners to find all consumer and producers in your application.
103
-
Most likely two scanners found your consumer/producer each.
104
-
See [configuration](configuration/configuration.md) to disable scanners.
0 commit comments