Skip to content

Commit

Permalink
microcks/microcks#1399 Updating documentation on parametrized channel…
Browse files Browse the repository at this point in the history
… in AsyncAPI v2.x

Signed-off-by: Laurent Broudoux <[email protected]>
  • Loading branch information
lbroudoux committed Nov 4, 2024
1 parent bbdca0e commit d67dc7c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ draft: false
title: "AsyncAPI Conventions"
date: 2024-05-27
publishdate: 2024-05-27
lastmod: 2024-05-27
lastmod: 2024-11-04
weight: 2
---

Expand Down Expand Up @@ -80,6 +80,44 @@ components:
message: Namaste
```
Starting with Microcks `1.11.0`, you'll also have access to a notation that is much more aligned with JSON Schema constraints on `schema.examples` definition being an array::

```yaml
channels:
/chat/{roomId}:
parameters:
idRoom:
description: Identifier of the chat room
schema:
type: string
examples:
- Example 1:
value: 1
- Example 2:
value: 2
- Example 3:
value: 2
[...]
```

or to a shorcut notation we introduced with AsyncAPI v3.x importer. This shorcut notation allows you to define example name and value using `name:value` items like illustrated below:

```yaml
channels:
/chat/{roomId}:
parameters:
idRoom:
description: Identifier of the chat room
schema:
type: string
examples:
- 'Example 1:1'
- 'Example 2:2'
- 'Example 3:2'
[...]
```


### AsyncAPI v3.x

For AsyncAPI v3.x, Microcks still supports **static parameter definition** like for AsyncAPI v2.X but also provides support for **dynamic parameter definition** using the `location` attribute.
Expand Down
1 change: 0 additions & 1 deletion hugo_stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"htmlElements": {
"tags": [
"a",
"base",
"blockquote",
"body",
"br",
Expand Down

0 comments on commit d67dc7c

Please sign in to comment.