Springwolf Core Versions Save

Automated documentation for event-driven applications built with Spring Boot

v1.2.0

2 weeks ago

Springwolf 1.2.0 is out! Thanks to all our contributors!

Besides a couple of bug fixes and small improvements, these are the noteworthy new features:

Kafka & Google PubSub Binding The Kafka bindings have been updated to spec version 0.5.0 and support for Google PubSub has been updated to also support channel bindings. Take a look at the binding artifacts for details.

Kotlinx Serialization Add-on The add-on has been extended to support polymorphism and received some smaller bugfixes.

Support for XML attributes The support for XML examples has been extended to also support XML attributes.

What's Changed

Full Changelog: https://github.com/springwolf/springwolf-core/compare/v1.1.0...v1.2.0

v1.1.0

1 month ago

Springwolf 1.1.0 is out! Thank you to all contributors.

It contains a couple bug fixes after the big 1.0.0 release last month, next to the following noteworthy new features:

  • @victorlev01 contributed the option to always edit the headers in springwolf-ui, even when no headers have been documented.
  • @SheheryarAamir added support for Google PubSub bindings using annotations, which are included in the new springwolf-googlepubsub-binding artifact
  • @ctasada duplicated the sns and sqs bindings to artifact (springwolf-(sns|sqs)-binding). We consider extract all bindings to own artifacts, which would be included by default in the plugin artifacts. The intention is to offer a more light-weight springwolf experience for users that only want to use annotations without auto-detection of listeners - and thereby avoid the additional dependencies as well
  • @ctasada added another artifact - in beta state - to support the Kotlin @SerialName annotation. This is packaged in springwolf-kotlinx-serialization-model-converter

What's Changed

New Contributors

Full Changelog: https://github.com/springwolf/springwolf-core/compare/v1.0.0...v1.1.0

v1.0.0

2 months ago

We are extremely happy to release Springwolf v1.0.0, a major milestone for us 🥳 It contains a lot of refactorings, some simplifications and the update to AsyncAPI spec 3.0 - contributed by @ctasada

AsyncAPI 3.0

The new AsyncAPI 3.0 specification was released at the end of 2023. It includes a new structure, more bindings and resolved the confusion around publish & subscribe.

@ctasada wrote the new springwolf-asyncapi artifact, which is a Java implementation of the spec targeted for Springwolf. With 14.320 additions, it is the largest contribution in the Springwolf history by far!

AsyncApiDocket deprecation

As announced in earlier releases, the AsyncApiDocket is not available for configuration anymore. We implemented your feedback and suggestions to ensure the new method using Spring application properties is as powerful (See discussion in issue: https://github.com/springwolf/springwolf-core/issues/445 )

Springwolf-ui

Springwolf-ui got a facelifting as well.

  • @aerfus contributed visualizations for number ranges of schemas.
  • @robert-henke contributed a better example highlighting library & the ability to render markdown in the description.
  • Dependencies were updated and testing was improved (including asyncapi/parser to validate the asyncapi.json files of the examples, replacing spectral)

Check out the demo at https://demo.springwolf.dev/springwolf-ui/asyncapi-ui.html

Better examples

The examples can be rendered as yaml and xml (besides json, which stays the default). This can be configured via the contentType attribute of the @AsyncMessage annotation.

Also, polymorphic types (@JsonTypeInfo) which are present as the field discriminator are rendered correctly now, resolving the long outstanding bug https://github.com/springwolf/springwolf-core/issues/160.

Breaking changes

  1. The package structure was updated, including a change of the package prefix from io.github.stavshamir.springwolf to io.github.springwolf. Most Springwolf annotations can be found in io.github.springwolf.core.asyncapi.annotations
    1. This includes the logging configuration, which is updated to logging.level.io.github.springwolf=DEBUG - in case you use this in your application.
  2. The AsyncApiDocket was removed. See our documentation or example projects on how to use Spring properties.
  3. The default of the configuration setting springwolf.use-fqn was changed to true. To go back to the old behaviour, specify springwolf.use-fqn=false.
  4. The SqsQueueBindings and SqsBindings contain new require values, which must be provided.

Migration guide

  1. Update the Springwolf imports
  2. If you have used the AsyncApiDocket, switch to spring application property configuration
    1. Document your listeners and publishers using the @AsyncListener & @AsyncPublisher annotation.
  3. Review the springwolf.docket.servers application.properties, as the fields are called host and protocol now.
  4. If you use the AsyncApiCustomizer, some fields might be moved due to the new AsyncAPI 3.0 spec and must be adjusted.

What's Changed

New Contributors

Full Changelog: https://github.com/springwolf/springwolf-core/compare/v0.18.0...v1.0.0

v0.18.0

3 months ago

v0.18.0 has been released, including new features and fixes. Our focus has been on refactorings and we are working hard to upgrade to AsyncAPI 3.0 in the next release - which will include breaking changes.

Avro and Protobuf support

We improved support for Avro and Protobuf by removing extraneous fields related to the wire format. At the same time, our kafka demo application show cases this, including the ability to consume and produce messages - all in one application. See CustomSpringwolfKafkaProducer for configuration.

Document also final classes (like String)

One issue from the beginning was the inability to enhance documentation on final classes as the @Schema annotation could not be attached. Now, by defining an envelope class and marking the property with @AsyncApiPayload, also final classes can be document. See the StringConsumer for more details.

Detect channels defined via bean configuration

Not everyone is using @Component or related annotations to mark classes for Spring. Now, Springwolf does also detect marked listener and publisher methods in classes, which are instantiated as Spring beans via configuration classes.

What's Changed

Full Changelog: https://github.com/springwolf/springwolf-core/compare/v0.17.0...v0.18.0

v0.17.0

5 months ago

v0.17.0 has been released with two new artifacts and many smaller improvements.

Thank you for your feedback on the AsyncApiDocket deprecation (#445). A couple improvements are included in this release while we try - with your help - to address the remaining ones.

Users of the kafka plugin will have to update to Spring Boot 3.2. due to a change in an underlying library.

JMS Plugin

Big Shout-out to @krzysztofxkwiecien for creating a new plugin to natively detect the @JmsListener along the AsyncAPI JMS binding.

json-schema Add-on

Next to the AsyncAPI schema, which is very similar to the OpenAPI schema, json-schema is also commonly used in applications. The newly added add-on translates the detected AsyncAPI schema to json-schema schema.

Want to try it? Just add the add-on. Everything else is handled by the library. More details.

Support for multiple brokers / servers

In advanced use-cases, an application is connected to multiple message brokers. How to indicate which broker a listener belongs to? Specify the servers property of the AsyncListener / AsyncPublisher annotation.

Payload extractor (beta)

Springwolf tries to extract the payload of listeners and publishers. Not all methods pass in the type directly, and instead it can be wrapped like List<Message<String>> where the actual payload is String. In earlier version, the classes like List were hard-coded to be extracted. Now, the classes to extract can be specified per configuration - to also support custom generic classes. More details will follow on springwolf.dev.

Please note that we release this in beta (we may completely change how this is configured) and are happy to listen to your feedback.

What's Changed

New Contributors

Full Changelog: https://github.com/springwolf/springwolf-core/compare/v0.16.0...v0.17.0

v0.16.0

6 months ago

We are happy to announce another release thanks to many changes made by our contributors. This release marks a milestone for Springwolf, as we just achieved 200 stargazers on GitHub.

Deprecated AsyncApiDocket

A while ago we introduced configuration via Spring properties. We view this as a more powerful and natural way of configuring applications in the SpringBoot ecosystem. In last couple of releases we focused on this new way of configuring Springwolf and maintaining the old way of configuring the AsyncApiDocket has become cumbersome.

Check the Quickstart to see how you can migrate.

Fully qualified schema names

Using springwolf.use-fqn=true, schema names will be generated using the fully qualified class name. This is deactivated due to backward compatibility by default, but is required to continue to use the publishing functionality.

SNS Plugin

We added a new Plugin to support documentation for producers that are using the SNS protocol.

AsyncGenericBinding Annotation

Because Springwolf does not support all binding properties, the generic-binding add-on was created. It allows to add all properties without validation according to the AsyncApi specification.

Behind the scenes

Special thanks to @tvahrst for transforming Springwolf into a more modern Spring Boot library:

  • Instead of relying on classpath scanning, Springwolf is now using Spring Boot Auto-configuration
  • AsyncApi info-extensions are now supported by using Spring properties
  • Springwolf beans are now only created if no custom implementations are present in the spring context (@ConditonalOnMissingBean)
  • Springwolf is now caching the Spring properties AsyncApiDocket instead of re-creating it

What's Changed

New Contributors

Full Changelog: https://github.com/springwolf/springwolf-core/compare/v0.15.1...v0.16.0

v0.15.0

7 months ago

We are happy to announce another release thanks to many changes made by our contributors.

(releasing 0.15.0 failed. Re-releasing as 0.15.1)

Inflector

We finally removed swagger-inflector dependency after successfully replacing it in the last releases. This resolves multiple dependency issues with old javax imports and duplicate swagger-... libraries.

Actuator

Now, it is possible to expose the /springwolf/docs as part of Spring Actuators. This removes the endpoint from the normal application and instead moves it to the internals. It must be enabled, more details on the website.

ObjectMapper

Previously, we created new Objectmappers statically to publish messages from the ui. To resolve #357 , the spring managed ObjectMapper is injected. This requires an ObjectMapper bean, which is usually created by Spring automatically. When you encounter a NoSuchBeanException, you can create one manually with:

@Bean
public ObjectMapper objectMapperBean() {
  return new ObjectMapper();
}

What's Changed

New Contributors

Full Changelog: https://github.com/springwolf/springwolf-core/compare/v0.14.0...v0.15.0

v0.14.0

8 months ago

We are happy to announce another release thanks to many changes made by our contributors.

ExampleJsonGenerator fixed

The ExampleJsonGenerator introduced in the last release included some bugs, which we have addressed. Thank you for the feedback and test cases that we have added as well. If you find further issue, please continue to report them. We decided to continue to stick with swagger-inflector as a fallback for this release, but plan to remove it in the next release.

@ConditionalOnProperty support

@jmwestbe added in #340 correct handling for @ConditionalOnProperty annotations. Springwolf does respect whether methods annotated with ...Listeners are actually activated now.

AWS SQS

We expanded our range of supported protocol to AWS SQS. Add the springwolf-sqs plugin to benefit from auto-detection of @SqsListener or use @AsyncPublisher with @SqsAsyncOperationBinding.

See the example for more details.

What's Changed

New Contributors

Full Changelog: https://github.com/springwolf/springwolf-core/compare/v0.13.0...v0.14.0

v0.13.0

9 months ago

We are happy announce another release thanks to many changes by our contributors.

One version for all artifacts

To avoid confusion for our users and to reduce complexity in their dependency management, we aligned all artifacts to be release together and have the same version.

Please be aware that some artifacts in this release might skip several minor versions.

Own implementation for generating example values

Until now, Springwolf was using an implementation from swagger-inflector to generate example values. Unfortunately swagger-inflector is rarely getting security updates. Therefore we decided to remove the dependency from Springwolf and replace its functionality with our own implementation.

We decided to deprecate the usage of swagger-inflector for generating example values for this release. Please create a new issue if you have any problems or unexpected output. In the meantime you can set Springwolf to continue to use the old behavior by setting springwolf.example-generator=swagger-inflector-json.

Please be aware that we plan to remove the old behavior with the next release.

Support for lazy generation

By default Springwolf loads during application startup, which can slow down the startup of large applications. It is now possible to defer the initialization of Springwolf until the application is ready. Check the documentation for the property springwolf.init-mode for further information.

Customizing of the AsyncAPI document

In case Springwolf does not produce the AsyncAPI document you need or expect, it is now possible to customize it yourself. Refer to the documentation for further details.

What's Changed

Full Changelog: https://github.com/springwolf/springwolf-core/compare/springwolf-core-0.11.1...v0.13.0

springwolf-core-0.11.1

10 months ago

Patch release particular for maven users (Bug report: https://github.com/springwolf/springwolf-core/issues/232)

What's Changed

Full Changelog: https://github.com/springwolf/springwolf-core/compare/springwolf-core-0.11.0...springwolf-core-0.11.1