This is meant as an update on what happened in the AsyncAPI tooling landscape for the past couple of months. Why 1
you might ask? Well, the previous times I made an update statement was through gist which I don't particularly like for giving updates. So this switches it up! If you are looking for the latest updates in other areas, check them out here:
- Maciej have done an update about all the EDA Design & Documentation tooling!
- Sergio have done an update around the AsyncAPI specification and parsers!
- Alejandra have done an update around the AsyncAPI documentation for June and July!
I would love to know what you would like out of these updates, what gives you value when you are reading these updates? Anything from the other updates you found gave value this one missed out on?
This post bundles updates from the following official tools, but not limited to: bundler, chatbot, studio, diff, glee, create-glee-app, cli, optimizer, modelina, generator, generator-react-sdk, java-template, java-spring-cloud-stream-template, java-spring-template, dotnet-nats-template and ts-nats-template.
Highlights
These are some of the highlights of changes that have happened in the tools and what's to come!
CLI
There is a lot of effort being put into the CLI to incorporate the many tools we have, so you have the power of each tool right at your fingertip.
peter-rr integrated the Converter so you can now easily upgrade your AsyncAPI documents on new spec versions. This can be done through asyncapi convert ./asyncapi.json 2.4.0
.
jonaslagoni integrated Modelina to give you the possibility of generating typed data models for your message payloads. This can be done through asyncapi generate models typescript ./asyncapi.json --output='./output'
.
Soon you will be able to use the generator, optimize AsyncAPI documents, find and show relations in multiple AsyncAPI documents and show difference between AsyncAPI documents.
If you have other ideas as to what the CLI tool should do, don't hesitate to create a feature request!
Glee
Glee now automatically generates documentation for you!
There is also a focus on supporting more and more protocols, currently, WebSocket Client is in the works and more lined up such as AMQP, Kafka and HTTP client and server just waiting to be picked up. If you want a protocol you use to be supported please reach out!
Modelina
Some huge changes have happened over the last months, which all got triggered by a new core model to fix many of the internal problems that the old model caused and immensely improve developer experience by simplifying the generators. All of these changes are happening on the next
branch and will be a pre-release until released as version 1! Currently, you can test out the new changes by switching to version 1.0.0-next.1
.
It has become really easy to customize the types of the models:
1const generator = new TypeScriptGenerator({
2 typeMapping: {
3 String: ({constrainedModel, options, propertyKey}) => {
4 return 'my custom type for strings';
5 }
6 }
7});
Also super easy to change the naming formats, for example for model names if you wanted their names to be CONSTANT CASE its as simple as changing the constraint:
1const generator = new TypeScriptGenerator({
2 constraints: {
3 modelName: typeScriptDefaultModelNameConstraints({
4 NAMING_FORMATTER: (name) => {
5 return constantCase(name);
6 }
7 })
8 }
9});
Modelina also now support Dart thanks to rmasarovic! Soon there will also be support for a Rust generator and a Python generator.
Full changelog
This is the full changelog of everything that has happened in the tools in the past months written in a more digestible manner!
CLI
- ron-debajyoti changed the way incorrect flags and commands are handled to improve user experience
- Souvikns changed the core oclif library to a fork to improve logging.
- peter-rr extended the error handling for
validate
- pranay202 fixed incorrect help message displayed for context
- jonaslagoni fixed a problem where oclif logging function throw an error when trying to generate models
- derberg fixed a problem where assets was uploaded to wrong release
- derberg removed a script that was left over and causing problems
- derberg made sure
.pkg
files for macOS got released and each release automatically update brew formula - magicmatatjahu added support for AsyncAPI 2.4.0
- KhudaDad414 removed custom CONTRIBUTING.md file to use the generic one
- imabp made sure unhandled rejections are thrown as error for Node < 15
- ritik307 made sure studio command throws correct error when invalid file path is used
- aayushmau5 added support for YAML output for the
diff
command - amanbedi1 switched the CLI banner
Simulator
- NektariosFifes added the initial setup for the electron application, that will serve as a dashboard for simulation
Generator
- magicmatatjahu fixed ts-node would use multiple instances
- pratik2315 started to rework the documentation by creating an initial outline
- lkmandy fixed a broken link in the documentation to semver syntax
- pavlikm fixed a depreciated import for simple-git
- mcturco switched the generator banner
- SP-SuperPoney added dotnet-nats-template to the list of templates
Generator React SDK
Java template
- ppatierno changed the default Java package
- dalelane fixed support for AsyncAPI documents with only publish or subscribe
- inspire99 updated the banner
Java Spring Template
- Sihamtahi fixed the link for test documents
- KhudaDad414 fixed all broken links in the documentation
- Tenischev fixed an issue with generated tests not being able to run
- Tenischev added support for multiple message
- Tenischev added support for additional data types
- Tenischev added information about AnonymousSchema to avoid confusion
Optimizer
- KhudaDad414 refactored the parsing process to easer add new paths used for optimization
- mcturco switched the optimizer banner
Bundler
Go Watermill template
- anandsunderraman added support for AMQP publisher
- KhudaDad414 fixed all broken links in the documentation
Studio
- magicmatatjahu added a new modal for when you are redirected from the old Playground to ease the transition for users
- nawed2611 ensured the modal that asks if you want to convert the AsyncAPI document to newer versions, now defaults to the latest
- magicmatatjahu added a survey popover to ask the users for feedback
- magicmatatjahu disabled a survey popover as it ended
- magicmatatjahu updated a bunch of dependencies, switched to use the new JSON Schema documents for the AsyncAPI spec, and updated Monaco configuration
- magicmatatjahu added support for AsyncAPI 2.4.0
- Namyalg updated the Studio icons and banner to the new design
- eltociear fixed a typo in the Dockerfile
- magicmatatjahu updated the Studio banner
- magicmatatjahu fixed the all-contributors section as it was not compliant
- magicmatatjahu added redirects from the old
playground.asyncapi.io
to Studio - magicmatatjahu added a modal to show what changed from the old playground, when redirected from it
- magicmatatjahu removed github-bot from codeowners file
.NET Nats template
- YoeriVD added a missing project reference to test project
- YoeriVD switched the generated code to using .NET Standard instead of .NET Core.
- YoeriVD removed some unintended comments and code left from another template
- jonaslagoni added a missing reference that hindered compilation
- jonaslagoni added 3 new parameters
packageVersion
,assemblyVersion
andfileVersion
to control the version of the library - jonaslagoni fixed incorrect usage of publish and subscribe
- jonaslagoni moved an unintended character from being generated
- jonaslagoni added a new parameter
framework
to control the targeted framework - jonaslagoni added a new parameter
repositoryUrl
to control the URL for the library repository - jonaslagoni added a new parameter
projectName
to control the name of the entire library - Florence-Njeri fixed an incorrect link to the generator docs
Java spring cloud stream template
- CameronRushton fixed a problem with union types in Avro schemas generating incorrect code.
- CameronRushton fixed a problem where Avro schemas with namespaces were not correctly used.
- CameronRushton added a missing import.
- CameronRushton fixed generation failed when payload schemas had an
$id
field. - damaru-inc added support for AsyncAPI 2.3.0
Glee
- sudoshreyansh when Glee detects invalid returned data it is now logged
- sudoshreyansh added a bunch of missing tests
- sudoshreyansh fixed glee would stop working if incorrect data was send
- KhudaDad414 fixed all broken links in the documentation
- pratik2315 removed unnecessary broadcast section
- fmvilas updated the Glee banner
- jonaslagoni removed unused node-ipc dependency
Diff
- aayushmau5 updated the Diff banner
- aayushmau5 integrated all-contributors
- aayushmau5 added a new features and output section to the main readme
- shivensinha4 added support for markdown output
Modelina
Modelina has now been split into two branches, master
and next
, where next
is the new version, targeted as version 1.0.0.
These are the changes on master
- Samridhi-98 fixed Java preset options was not added as type
- Samridhi-98 fixed Go preset options was not added as type
- Samridhi-98 fixed C# preset options was not added as type
- Samridhi-98 fixed Javascript preset options was not added as type
- Samridhi-98 fixed TypeScript preset options was not added as type
- Samridhi-98fixed some broken links in the documentation
- Samridhi-98 ensured that reserved keywords cannot be rendered for Go
- Samridhi-98 fixed an issue where
_
should be excluded from being converted from the Java enum rendering - slowikowskiarkadiusz added support for shorthand accessors for C# classes
- slowikowskiarkadiusz added support for different collection types for C# list properties
- slowikowskiarkadiusz fixed an issue where C# generated optional property types even if they were required properties
- slowikowskiarkadiusz improved a lot of the C# code formatting
- ibernabeudev added enum rendering to Go
- micro-jumbo fixed Jackson annotations was generated by default for Java enums
- PanMan fixed a spelling mistake that caused a broken link
- jonaslagoni added an example how to use custom enum value names
- jonaslagoni added an example how to use a custom generic inheritance for a class in C#
- Polygens fixed an issue where the correct extension reference was not used for C#
- Polygens ensured C# serialization functionality is supported in .NET Core 3.0.
- jonaslagoni clarified more information about the champions concept
- owais34 added support for AsyncAPI 2.4.0
- rmasarovic added support for Dart
These are the changes on next
There are simply too many refactoring's to show, if you want to deep dive into the rewrite, take a look at this PR: https://github.com/asyncapi/modelina/pull/674
To that end
If you have worked on something or are working on something that you would like to be included in these updates, feel free to reach out on slack!
Photo by Markus Winkler on Unsplash