redb extension for VS Code

redb Route XML: a new project from the redb templates, schema completion and validation for redb.Route XML routes, and an editable route graph. The format does not need an editor: a route file is plain XML that the runtime loads as it is; the extension only makes it easier to write and read.

Install from the Marketplace
$ code --install-extension redb.redb-route-xml
VS Code 1.85+ Red Hat XML comes with it .NET SDK for new projects

1 New project

The redb: New Project command in the Command Palette, or the button in the redb view, opens a page that creates a project from the redb templates through dotnet new.

  • Status. The top of the page shows the installed .NET SDKs and both template packages, redb.Templates and redb.Tsak.Templates, with an Install button for a missing package and an Update button when nuget.org has a newer version.
  • Templates. Every template of the installed packages is a card in one of three groups: redb.Route XML modules, redb.Tsak hosts and applications.
  • Form. The chosen template's form is built from the template's own parameters: project name, database, target framework and others. A framework with no SDK on this machine is marked, and a location where a folder of that name already holds files is refused.
  • Create. Create runs dotnet new and, when the project carries a local tool manifest, dotnet tool restore. The output shows on the page and in the redb Route output channel, and a running step can be cancelled. When it is done, the project opens in this window, in a new window or is added to the workspace.

The cards and the form come from the templates themselves, so a new template in the redb packages appears without an update of the extension.

Template packages not installed: Install 4.5.0 buttons
No templates on the machine: one click installs them
redb.Route modules and a template form
redb.Route modules and the chosen template's form
The applications group
Applications: console, sites, worker, chat, BFF, Identity

The same templates without an editor: Quick Start.

2 XML routes in the editor

  • Schema completion and validation. Every element and every connector's typed options, aware of consumer versus producer. The schema is bound by the namespace urn:redb:route:1.0, not by the file name, and is regenerated with each release.
  • Skeletons. Completion inserts composite skeletons for <route>, <choice> and <tryCatch>; the list depends on the place in the document, so there is no <choice> under <routes>.
  • Bean references. Typing # in a value lists the document's <bean name> declarations.
  • Routes view. The redb button in the Activity Bar opens a tree of *.route.xml and *.redb-route.xml files: the route id and its from endpoint; a click opens the file at the line.
A route file in the editor and the Routes view
A route file in the editor, the Routes view on the left

3 Route graph

The same file as a graph: Open With → redb Route Graph, or the graph button in the editor title. The graph is editable, and changes go into the XML text.

  • Insert a step from the palette at +, delete, drag to reorder or to move into and out of containers.
  • A properties panel: the URI is split into scheme, path and options with lists of allowed values; sensitive options are masked.
  • Left to right or top to bottom layout, folding, zoom.
  • {{key}} placeholders show the value from context.sample.json and config/*.json, resolved the way Tsak resolves them.
Route graph: try-catch, transaction, choice
try-catch, a transaction, two choices; the dashed line is the path when no condition matches
Mermaid diagram: the redb Route: Show Mermaid Diagram command. It needs the .NET tool dotnet tool install -g redb.Route.Xml.CodeGen.

4 Install and requirements

Marketplaceredb.redb-route-xml, or from the command line: code --install-extension redb.redb-route-xml
Without the MarketplaceEvery redb.Route release carries the .vsix; install it with Extensions → … → Install from VSIX
VS Code1.85 or newer
Red Hat XMLA declared dependency: VS Code installs it on its own
.NET SDKNeeded only for a new project and the Mermaid diagram. The new project page shows which SDKs are installed
redb templatesNot installed automatically: the new project page offers them with one click
redb Route XML in the VS Code extensions list
redb Route XML in the extensions list