Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: added content for operations in AsyncAPI Document #2171

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7c6b514
document adding-operations
BhaswatiRoy Sep 26, 2023
4fff5f3
Update pages/docs/concepts/asyncapi-document/adding-operations.md
BhaswatiRoy Oct 3, 2023
d361b7f
Update pages/docs/concepts/asyncapi-document/adding-operations.md
BhaswatiRoy Oct 3, 2023
46f9487
Update pages/docs/concepts/asyncapi-document/adding-operations.md
BhaswatiRoy Oct 3, 2023
c59b9fd
Update pages/docs/concepts/asyncapi-document/adding-operations.md
BhaswatiRoy Oct 3, 2023
26e0044
Update pages/docs/concepts/asyncapi-document/adding-operations.md
BhaswatiRoy Oct 3, 2023
e5d0e60
Update pages/docs/concepts/asyncapi-document/adding-operations.md
BhaswatiRoy Oct 3, 2023
7a9903f
Update pages/docs/concepts/asyncapi-document/adding-operations.md
BhaswatiRoy Oct 3, 2023
2ea6b05
Update pages/docs/concepts/asyncapi-document/adding-operations.md
BhaswatiRoy Oct 3, 2023
f23afda
Update pages/docs/concepts/asyncapi-document/adding-operations.md
BhaswatiRoy Oct 3, 2023
ea07641
Update pages/docs/concepts/asyncapi-document/adding-operations.md
BhaswatiRoy Oct 3, 2023
551940c
updated the adding operations sub section
BhaswatiRoy Oct 30, 2023
9749db3
updated adding operations subsection
BhaswatiRoy Oct 30, 2023
b3643a8
removed unwanted characters
BhaswatiRoy Oct 30, 2023
5b4767e
Update pages/docs/concepts/asyncapi-document/adding-operations.md
BhaswatiRoy Oct 30, 2023
8ab1445
Update pages/docs/concepts/asyncapi-document/adding-operations.md
BhaswatiRoy Oct 30, 2023
dc93f5a
updated the changes including diagrams, and addition of content
BhaswatiRoy Oct 30, 2023
c8ef443
Merge branch 'gsod-work-1' of https://github.com/BhaswatiRoy/website …
BhaswatiRoy Oct 30, 2023
9e7a602
updated changes
BhaswatiRoy Oct 30, 2023
aaf499f
Update pages/docs/concepts/asyncapi-document/adding-operations.md
BhaswatiRoy Oct 31, 2023
61679a6
Update pages/docs/concepts/asyncapi-document/adding-operations.md
BhaswatiRoy Oct 31, 2023
c0da456
removed duplicate lines
BhaswatiRoy Oct 31, 2023
debd164
aligned mermaid diagram code with other writers
BhaswatiRoy Oct 31, 2023
8f5f1da
updated mermaid diagram to align with the style guide
BhaswatiRoy Nov 1, 2023
af6fa6c
added field name details in operations
BhaswatiRoy Nov 1, 2023
511e89a
Update pages/docs/concepts/asyncapi-document/adding-operations.md
BhaswatiRoy Nov 7, 2023
436b618
Update pages/docs/concepts/asyncapi-document/adding-operations.md
BhaswatiRoy Nov 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pages/docs/concepts/asyncapi-document/_section.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: 'AsyncAPI Document'
weight: 50
---
63 changes: 63 additions & 0 deletions pages/docs/concepts/asyncapi-document/adding-operations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: Adding Operations
weight: 60
---

In a messaging system, the term "operations" refers to the various methods by which messages are exchanged between participants or components.
BhaswatiRoy marked this conversation as resolved.
Show resolved Hide resolved

## Features

- Operations describe the behaviors and capabilities of the messaging channels described in the AsyncAPI document.

- In a messaging channel, an operation represents a particular action or interaction that can be performed.

- The purpose of these operations is to provide a standardized means for describing the process of sending, receiving from, requesting, or replying to messages within the messaging system.
BhaswatiRoy marked this conversation as resolved.
Show resolved Hide resolved

## Defining Operations

Operations can be defined as an independent object in the AsyncAPI document. Operations have the following components for it's definition. More information about each field names that are used to define operations can be found [here](https://v3.asyncapi.com/docs/reference/specification/v3.0.0-next-major-spec.12#operationObject).
BhaswatiRoy marked this conversation as resolved.
Show resolved Hide resolved
Additionally, an example to show the usage of each field names in defining operations can be found [here](https://v3.asyncapi.com/docs/reference/specification/v3.0.0-next-major-spec.12#operationsObject).
`operations` are separate objects in the AsyncAPI document on the same level.
`channels` can be linked within `operations` by referencing them within the `channels`, just like the following example -
BhaswatiRoy marked this conversation as resolved.
Show resolved Hide resolved
BhaswatiRoy marked this conversation as resolved.
Show resolved Hide resolved
For adding operations to an AsyncAPI document, we need to define them within the channels section of the document. You can add operations to an AsyncAPI document as follows -
BhaswatiRoy marked this conversation as resolved.
Show resolved Hide resolved

The following diagram briefs the important field names that are frequently used to define AsyncAPI operations in Spec 3.0.0 -
BhaswatiRoy marked this conversation as resolved.
Show resolved Hide resolved

```mermaid
flowchart TD
BhaswatiRoy marked this conversation as resolved.
Show resolved Hide resolved
style A fill:#E5EE8C,stroke:#333,stroke-width:2px
style B fill:#CBF399,stroke:#333,stroke-width:2px
style C fill:#F5B5EF,stroke:#333,stroke-width:2px
style D fill:#F568A8,stroke:#333,stroke-width:2px

style E fill:#B40486,stroke:#333,stroke-width:2px
style F fill:#86B404,stroke:#333,stroke-width:2px
style G fill:#01A9DB,stroke:#333,stroke-width:2px
style H fill:#F781F3,stroke:#333,stroke-width:2px

A[Fields required to define AsyncAPI Operations] -->|1| B[Summary]
BhaswatiRoy marked this conversation as resolved.
Show resolved Hide resolved
A -->|2| C[Description]
A -->|3| D[Channel]
A -->|4| E[Action]
A -->|5| F[Tags]
A -->|6| G[Bindings]
A -->|7| H[Traits]

classDef labelStyle color:#000000;
class A,B,C,D,E,F,G,H labelStyle;
```

## Adding Operations

`operations` are no longer under `channels` in AsyncAPI Spec 3.0.0, instead, `operations` are separate objects in the AsyncAPI document on the same level.
BhaswatiRoy marked this conversation as resolved.
Show resolved Hide resolved
`channels` can be linked within `operations` by referencing them within the `channels`, just like the following example -
BhaswatiRoy marked this conversation as resolved.
Show resolved Hide resolved

```
onUserSignUp:
title: User sign up
summary: Action to sign a user up.
description: A longer description
action: send
channel:
$ref: '#/channels/userSignup'
```