Skip to content

[FEATURE] Support literal curly braces in channel addresses #1241

Open

Description

@borisalekseev

Description

The parser currently treats every non-empty pair of curly braces in a channel address as a parameter expression:

export function parseUrlVariables(str: string): string[] {
if (typeof str !== 'string') return [];
const variables = str.match(/{(.+?)}/g);
if (!variables || variables.length === 0) return [];
return variables.map(v => v.slice(1, -1));
}

There is no supported way to mark curly braces as literal characters. However, MQTT, AMQP, and other protocols may use curly braces as ordinary characters in topic names, routing keys, queue names, and other channel addresses. As a result, literal addresses cannot be distinguished from AsyncAPI parameter expressions when channel parameter validation runs.

Please add and document an unambiguous way to represent literal curly braces and exclude them from parameter extraction in both AsyncAPI v2 and v3.

The AsyncAPI specification defines channel address expressions but does not define escaping, so the solution may require coordination with asyncapi/spec:
https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#channel-address-expressions

Activity

  1. github-actions commented on Aug 30, 2026

    @github-actions

    Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
    Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions