From a7b285d54730f265341a3622489eced5be7fe6ac Mon Sep 17 00:00:00 2001 From: Mahfuza Humayra Mohona Date: Tue, 28 Nov 2023 07:29:26 +0600 Subject: [PATCH 01/15] added index --- 100-level-AsyncAPI-Intro/index.json | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 100-level-AsyncAPI-Intro/index.json diff --git a/100-level-AsyncAPI-Intro/index.json b/100-level-AsyncAPI-Intro/index.json new file mode 100644 index 0000000..978c999 --- /dev/null +++ b/100-level-AsyncAPI-Intro/index.json @@ -0,0 +1,27 @@ +{ + "title": "100 Level AsyncAPI Intro", + "description": "Introduction of AsyncAPI - 100 Level", + "details": { + "intro": { + "text": "intro.md" + }, + "steps": [ + { + "text": "step1.md" + }, + { + "text": "step2.md" + }, + { + "text": "step3.md" + } + ], + "finish": { + "text": "finish.md" + } + }, + "backend": { + "imageid": "ubuntu" + } + } + \ No newline at end of file From 075c9529bf9117a367ac63393b1fb8ea833b6789 Mon Sep 17 00:00:00 2001 From: Mahfuza Humayra Mohona Date: Tue, 28 Nov 2023 15:48:04 +0600 Subject: [PATCH 02/15] module 4 --- 100-level-AsyncAPI-Intro/step3.md | 71 +++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 100-level-AsyncAPI-Intro/step3.md diff --git a/100-level-AsyncAPI-Intro/step3.md b/100-level-AsyncAPI-Intro/step3.md new file mode 100644 index 0000000..8be2eaf --- /dev/null +++ b/100-level-AsyncAPI-Intro/step3.md @@ -0,0 +1,71 @@ +When Chan goes back to his planet, he wants to communitcate with Eva. For communicating he needs to learn how to write AsyncAPI documentation and check if he can send a message to Eve. + +### Writing an AsyncAPI Document from Scratch: + +#### Setting Up the Basics: + +Chan begins by setting up his space message plan. He writes: + +``` +asyncapi: 3.0.0 +info: + title: Sending Signal to Eve + version: 0.1.0 +``` + +This is like Chan saying, "I'm using the 3.0.0 space message rules, and I'm naming my plan `Sending Signal to Eve.`" + +#### Creating Channels and Messages + +Chan then decides on the path his message will take to Eve. He sets up a channel, like a route in space, and names it `userSignedUp` with an address `Earth/letter`. The document looks like: + +``` +channels: + userSignedUp: + address: Earth/letter + messages: + lettertoEarth: + description: Communicating with Eve. + payload: + type: object + additionalProperties: false + properties: + fullName: + type: string + email: + type: string + format: email + age: + type: integer + minimum: 18 +``` + +This part is like Chan detailing the contents of his message – like who it's from (full name), how to contact back (email), and making sure the receiver is old enough (age). + +#### Setting Up Operations + +Finally, Chan adds instructions for how the message should be sent. He writes: + +``` +operations: + userSignedUp: + action: send + channel: + $ref: '#/channels/lettertoEarth' +``` + +This tells his spaceship that it should `send` messages through the `userSignedUp` channel. + +### Using AsyncAPI Tools for Validating the Document + +After writing his space message plan, Chan uses a tool called AsyncAPI Studio to make sure everything is set up correctly. It's like a helper that checks his work to make sure there are no mistakes. + +To use AsyncAPI Studio, Chan would first install it using the command `npm install -g @asyncapi/studio`. Then, he would open the AsyncAPI document in the studio using the command `asyncapi studio my-document.yaml`. The studio would then check the document for errors and provide suggestions for improvements. + +### Hands-on Exercise + +Chan wants to practice more. He thinks about adding a new property for a username and creating a new channel for messages to Mars. He updates his document with these new details and then uses AsyncAPI Studio to validate his changes. + +#### Expected Outcome + +After following these steps, Chan should be able to see his updated document in the AsyncAPI Studio. The studio should validate the document and show any errors or warnings. From 9bde547bb7f454988542fc3a985493d43e7f1503 Mon Sep 17 00:00:00 2001 From: Mahfuza Humayra Mohona Date: Tue, 28 Nov 2023 22:18:28 +0600 Subject: [PATCH 03/15] update --- 100-level-AsyncAPI-Intro/index.json | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 100-level-AsyncAPI-Intro/index.json diff --git a/100-level-AsyncAPI-Intro/index.json b/100-level-AsyncAPI-Intro/index.json deleted file mode 100644 index 978c999..0000000 --- a/100-level-AsyncAPI-Intro/index.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "title": "100 Level AsyncAPI Intro", - "description": "Introduction of AsyncAPI - 100 Level", - "details": { - "intro": { - "text": "intro.md" - }, - "steps": [ - { - "text": "step1.md" - }, - { - "text": "step2.md" - }, - { - "text": "step3.md" - } - ], - "finish": { - "text": "finish.md" - } - }, - "backend": { - "imageid": "ubuntu" - } - } - \ No newline at end of file From 9abaeadb3d56604e9bd8ceaa50800f2050be5a58 Mon Sep 17 00:00:00 2001 From: Mahfuza Humayra Mohona Date: Wed, 29 Nov 2023 12:24:23 +0600 Subject: [PATCH 04/15] update format --- 100-level-AsyncAPI-Intro/step3.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/100-level-AsyncAPI-Intro/step3.md b/100-level-AsyncAPI-Intro/step3.md index 8be2eaf..4b4ead5 100644 --- a/100-level-AsyncAPI-Intro/step3.md +++ b/100-level-AsyncAPI-Intro/step3.md @@ -1,8 +1,8 @@ -When Chan goes back to his planet, he wants to communitcate with Eva. For communicating he needs to learn how to write AsyncAPI documentation and check if he can send a message to Eve. +When Chan has to go back to his planet, he wants to keep talking to Eve. Eve is a bit sad that Chan is leaving, but she's also excited to try sending messages across space. They decide that Chan will learn to write AsyncAPI documents so they can stay in touch. -### Writing an AsyncAPI Document from Scratch: +### Writing an AsyncAPI Document -#### Setting Up the Basics: +#### Starting Simple Chan begins by setting up his space message plan. He writes: @@ -13,15 +13,15 @@ info: version: 0.1.0 ``` -This is like Chan saying, "I'm using the 3.0.0 space message rules, and I'm naming my plan `Sending Signal to Eve.`" +This is like Chan saying, "I'm using the `3.0.0` space message rules, and I'm naming my plan `Sending Signal to Eve.`". -#### Creating Channels and Messages +#### Making a Message Route -Chan then decides on the path his message will take to Eve. He sets up a channel, like a route in space, and names it `userSignedUp` with an address `Earth/letter`. The document looks like: +Next, Chan picks a path for his message. He makes a channel called `spaceMessage` with the address `Earth/letter`. Now his plan looks like this: ``` channels: - userSignedUp: + spaceMessage: address: Earth/letter messages: lettertoEarth: @@ -40,27 +40,27 @@ channels: minimum: 18 ``` -This part is like Chan detailing the contents of his message – like who it's from (full name), how to contact back (email), and making sure the receiver is old enough (age). +Here, Chan is planning what to put in his message, like the sender's full name, their email, and their age. -#### Setting Up Operations +#### How to Send the Message -Finally, Chan adds instructions for how the message should be sent. He writes: +Last, Chan writes how to send the message: ``` operations: - userSignedUp: + spaceMessage: action: send channel: $ref: '#/channels/lettertoEarth' ``` -This tells his spaceship that it should `send` messages through the `userSignedUp` channel. +This part tells his spaceship to send the message using the `spaceMessage` channel. -### Using AsyncAPI Tools for Validating the Document +### Checking the Document -After writing his space message plan, Chan uses a tool called AsyncAPI Studio to make sure everything is set up correctly. It's like a helper that checks his work to make sure there are no mistakes. +Chan uses AsyncAPI Studio to make sure his message plan is good. It's like a helper to check for mistakes. -To use AsyncAPI Studio, Chan would first install it using the command `npm install -g @asyncapi/studio`. Then, he would open the AsyncAPI document in the studio using the command `asyncapi studio my-document.yaml`. The studio would then check the document for errors and provide suggestions for improvements. +He installs it with `npm install -g @asyncapi/studio` and opens his plan in the studio with `asyncapi studio my-document.yaml`. The studio looks for errors and gives tips. ### Hands-on Exercise From e9ff25fb36f9f6d7129d61e4ef0df4a77d8145bd Mon Sep 17 00:00:00 2001 From: Mahfuza Humayra Mohona Date: Wed, 29 Nov 2023 12:39:49 +0600 Subject: [PATCH 05/15] update code --- 100-level-AsyncAPI-Intro/step3.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/100-level-AsyncAPI-Intro/step3.md b/100-level-AsyncAPI-Intro/step3.md index 4b4ead5..c0e5a11 100644 --- a/100-level-AsyncAPI-Intro/step3.md +++ b/100-level-AsyncAPI-Intro/step3.md @@ -51,7 +51,7 @@ operations: spaceMessage: action: send channel: - $ref: '#/channels/lettertoEarth' + $ref: '#/channels/spaceMessage' ``` This part tells his spaceship to send the message using the `spaceMessage` channel. From 595c88352f277a24f38ed3d402bb3aeebf345f04 Mon Sep 17 00:00:00 2001 From: Mahfuza Humayra Mohona Date: Wed, 29 Nov 2023 12:42:09 +0600 Subject: [PATCH 06/15] add studio link --- 100-level-AsyncAPI-Intro/step3.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/100-level-AsyncAPI-Intro/step3.md b/100-level-AsyncAPI-Intro/step3.md index c0e5a11..8aaf46d 100644 --- a/100-level-AsyncAPI-Intro/step3.md +++ b/100-level-AsyncAPI-Intro/step3.md @@ -62,6 +62,8 @@ Chan uses AsyncAPI Studio to make sure his message plan is good. It's like a hel He installs it with `npm install -g @asyncapi/studio` and opens his plan in the studio with `asyncapi studio my-document.yaml`. The studio looks for errors and gives tips. +He also uses the Web version of [AsyncAPI Studio](https://studio.asyncapi.com/) where he can simply paste his document and be able to check if he has any error there. + ### Hands-on Exercise Chan wants to practice more. He thinks about adding a new property for a username and creating a new channel for messages to Mars. He updates his document with these new details and then uses AsyncAPI Studio to validate his changes. From 3294f2768a4d69dc6c3ad76bc19d5d72ba9a674d Mon Sep 17 00:00:00 2001 From: Mahfuza Humayra Mohona Date: Thu, 30 Nov 2023 08:42:34 +0600 Subject: [PATCH 07/15] add handson exercise --- .../chan-message-errors.yaml | 22 +++++ 100-level-AsyncAPI-Intro/chan-to-eve.yaml | 19 ++++ 100-level-AsyncAPI-Intro/chan-to-mars.yaml | 16 ++++ 100-level-AsyncAPI-Intro/step3.md | 90 +++++++++++++++++-- 4 files changed, 139 insertions(+), 8 deletions(-) create mode 100644 100-level-AsyncAPI-Intro/chan-message-errors.yaml create mode 100644 100-level-AsyncAPI-Intro/chan-to-eve.yaml create mode 100644 100-level-AsyncAPI-Intro/chan-to-mars.yaml diff --git a/100-level-AsyncAPI-Intro/chan-message-errors.yaml b/100-level-AsyncAPI-Intro/chan-message-errors.yaml new file mode 100644 index 0000000..3847553 --- /dev/null +++ b/100-level-AsyncAPI-Intro/chan-message-errors.yaml @@ -0,0 +1,22 @@ +asyncapi: 3.0.0 +info: + title: Chan's Message to Eve + version: 1.0.0 +channels: + spaceMessage: + address: Eve/letter + messages: + lettertoEarth: + description: Greetings From Chan + payload: + type: object + additionalProperties: false + properties: + fullName: + type: string + email: + type: string + format: email + age: + type: integer + minimum: 18 diff --git a/100-level-AsyncAPI-Intro/chan-to-eve.yaml b/100-level-AsyncAPI-Intro/chan-to-eve.yaml new file mode 100644 index 0000000..81b5c90 --- /dev/null +++ b/100-level-AsyncAPI-Intro/chan-to-eve.yaml @@ -0,0 +1,19 @@ +asyncapi: 3.0.0 +info: + title: Chan's Message to Eve + version: 1.0.0 +channels: + spaceMessage: + address: Eve/letter + messages: + lettertoEarth: + description: Greetings From Chan + payload: + type: object + additionalProperties: false + properties: + fullName: + type: string + age: + type: integer + minimum: 118 diff --git a/100-level-AsyncAPI-Intro/chan-to-mars.yaml b/100-level-AsyncAPI-Intro/chan-to-mars.yaml new file mode 100644 index 0000000..4e29e29 --- /dev/null +++ b/100-level-AsyncAPI-Intro/chan-to-mars.yaml @@ -0,0 +1,16 @@ +asyncapi: 3.0.0 +info: + title: Message to Mars + version: 0.1.0 +channels: + marsMessage: + address: Mars/greetings + messages: + greetingToMars: + description: Communicating with Mars. + payload: + type: object + additionalProperties: false + properties: + fullName: + type: string \ No newline at end of file diff --git a/100-level-AsyncAPI-Intro/step3.md b/100-level-AsyncAPI-Intro/step3.md index 8aaf46d..f5e8e58 100644 --- a/100-level-AsyncAPI-Intro/step3.md +++ b/100-level-AsyncAPI-Intro/step3.md @@ -32,15 +32,12 @@ channels: properties: fullName: type: string - email: - type: string - format: email age: type: integer minimum: 18 ``` -Here, Chan is planning what to put in his message, like the sender's full name, their email, and their age. +Here, Chan is planning what to put in his message, like the sender's full name, and their age. #### How to Send the Message @@ -64,10 +61,87 @@ He installs it with `npm install -g @asyncapi/studio` and opens his plan in the He also uses the Web version of [AsyncAPI Studio](https://studio.asyncapi.com/) where he can simply paste his document and be able to check if he has any error there. -### Hands-on Exercise +### Hands-on Exercise: Guiding Chan's Interstellar Messages to Eve + +Chan wants to practice more. He thinks about adding a new property for a username and creating a new channel for messages to Mars. He updates his document with these new details and then uses AsyncAPI Studio to validate his changes. But he seems to have problem! He needs your help to comminicate with Eve. + +#### Exercise 1: Crafting the Initial Message + +Chan is ready to send his first space message to Eve, but he needs to include a `spacename` in the message format. + +**Your Mission:** + +1. Open the terminal and use the command `nano chan-to-eve.yaml` to edit Chan's draft. +2. In the payload section, insert a new property for the `spacename`: + + ```yaml + spacename: + type: string + ``` + +3. Save and exit the editor. Let Chan know his message structure is set! + +#### Exercise 2: Fixing Communication Errors + +Chan's message plan has some errors that are preventing it from being sent correctly. + +**Your Mission:** + +1. Use `nano chan-message-errors.yaml` in the terminal to open the file with errors. +2. Identify and correct any YAML syntax errors or missing fields. +3. Save your corrections and inform Chan that his message path is now clear. + +#### Exercise 3: Customizing the Message for Eve + +Chan wishes to make his messages more personal with timestamps and priority levels. + +**Your Mission:** + +1. Reopen `chan-to-eve.yaml` in the terminal. +2. Add the message payload with `timestamp` and `priority` fields: + ```yaml + timestamp: + type: string + format: date-time + priority: + type: integer + ``` + +3. Save the file and show Chan how his messages to Eve will now carry these unique details. + +#### Exercise 4: Expanding Communication Channels + +Chan is eager to extend his communication network to a friend on Mars. + +**Your Mission:** +1. Create a new file `chan-to-mars.yaml` using the terminal. +2. Define a `marsMessage` channel with unique properties and an address. +3. After saving, use AsyncAPI Studio to validate the new Martian message route and update Chan on your success. + +Certainly! Here's an additional exercise focusing on the "How to Send the Message" aspect for the `chan-to-mars.yaml` file. + +### Exercise 5: Defining the Message Sending Protocol for Mars Communication + +Now that Chan has set up the basic structure for communicating with Mars, he needs to define the specifics of how the messages will be sent and received. This involves specifying the operations for the `marsMessage` channel in his AsyncAPI document. + +**Your Mission:** + +1. Open `chan-to-mars.yaml` using the terminal command `nano chan-to-mars.yaml`. +2. Add the operations section to define how messages will be sent to and received from Mars. You might structure it like this: + + ```yaml + operations: + marsMessage: + action: send + channel: + $ref: '#/channels/marsMessage' + ``` + +3. Save and exit the editor. Let Chan know that his Mars communication protocol is now defined! -Chan wants to practice more. He thinks about adding a new property for a username and creating a new channel for messages to Mars. He updates his document with these new details and then uses AsyncAPI Studio to validate his changes. +#### Final Step: -#### Expected Outcome +After completing this task, use AsyncAPI Studio to validate the updated `chan-to-mars.yaml` document to ensure everything is set up correctly for interplanetary communication. -After following these steps, Chan should be able to see his updated document in the AsyncAPI Studio. The studio should validate the document and show any errors or warnings. +#### Review and Intergalactic Comparison: +Compare your final AsyncAPI documents with Chan's original ideas to understand different communication strategies in the cosmos and solidify your understanding of AsyncAPI. \ No newline at end of file From 5d3793ec41c04d32993e9cb2c5f1aa8eeda6bd5b Mon Sep 17 00:00:00 2001 From: Mahfuza Humayra Mohona Date: Mon, 11 Dec 2023 12:04:51 +0600 Subject: [PATCH 08/15] added background file --- 100-level-AsyncAPI-Intro/index.json | 32 +++++++++++++++++++ .../assets}/chan-message-errors.yaml | 0 .../{ => step3/assets}/chan-to-eve.yaml | 0 .../{ => step3/assets}/chan-to-mars.yaml | 0 100-level-AsyncAPI-Intro/step3/background.sh | 9 ++++++ .../{step3.md => step3/text.md} | 0 6 files changed, 41 insertions(+) create mode 100644 100-level-AsyncAPI-Intro/index.json rename 100-level-AsyncAPI-Intro/{ => step3/assets}/chan-message-errors.yaml (100%) rename 100-level-AsyncAPI-Intro/{ => step3/assets}/chan-to-eve.yaml (100%) rename 100-level-AsyncAPI-Intro/{ => step3/assets}/chan-to-mars.yaml (100%) create mode 100644 100-level-AsyncAPI-Intro/step3/background.sh rename 100-level-AsyncAPI-Intro/{step3.md => step3/text.md} (100%) diff --git a/100-level-AsyncAPI-Intro/index.json b/100-level-AsyncAPI-Intro/index.json new file mode 100644 index 0000000..1595415 --- /dev/null +++ b/100-level-AsyncAPI-Intro/index.json @@ -0,0 +1,32 @@ +{ + "title": "100 Level AsyncAPI Intro", + "description": "Introduction of AsyncAPI - 100 Level", + "details": { + "intro": { + "text": "intro.md", + "foreground": "setup_node.sh" + }, + "steps": [ + { + "title": "Event-Driven Architectures", + "text": "step1.md" + }, + { + "title": "AsyncAPI Specification", + "text": "step2.md" + }, + { + "title": "Creating and Validating AsyncAPI Code and Documents", + "text": "step3/text.md", + "background": "step3/background.sh" + } + ], + "finish": { + "text": "finish.md" + } + }, + "backend": { + "imageid": "ubuntu" + } + } + \ No newline at end of file diff --git a/100-level-AsyncAPI-Intro/chan-message-errors.yaml b/100-level-AsyncAPI-Intro/step3/assets/chan-message-errors.yaml similarity index 100% rename from 100-level-AsyncAPI-Intro/chan-message-errors.yaml rename to 100-level-AsyncAPI-Intro/step3/assets/chan-message-errors.yaml diff --git a/100-level-AsyncAPI-Intro/chan-to-eve.yaml b/100-level-AsyncAPI-Intro/step3/assets/chan-to-eve.yaml similarity index 100% rename from 100-level-AsyncAPI-Intro/chan-to-eve.yaml rename to 100-level-AsyncAPI-Intro/step3/assets/chan-to-eve.yaml diff --git a/100-level-AsyncAPI-Intro/chan-to-mars.yaml b/100-level-AsyncAPI-Intro/step3/assets/chan-to-mars.yaml similarity index 100% rename from 100-level-AsyncAPI-Intro/chan-to-mars.yaml rename to 100-level-AsyncAPI-Intro/step3/assets/chan-to-mars.yaml diff --git a/100-level-AsyncAPI-Intro/step3/background.sh b/100-level-AsyncAPI-Intro/step3/background.sh new file mode 100644 index 0000000..bc12e14 --- /dev/null +++ b/100-level-AsyncAPI-Intro/step3/background.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# Clone the specified repository +git clone https://github.com/asyncapi/learning-paths + +# Change directory into the cloned repository +cd learning-path/100-level-AsyncAPI-Intro/step3/assets + +# Any additional background setup tasks can be added here diff --git a/100-level-AsyncAPI-Intro/step3.md b/100-level-AsyncAPI-Intro/step3/text.md similarity index 100% rename from 100-level-AsyncAPI-Intro/step3.md rename to 100-level-AsyncAPI-Intro/step3/text.md From d89ec106e8c3e112cb7dc48b4a5d64cff38a8a5a Mon Sep 17 00:00:00 2001 From: Mahfuza Humayra Mohona Date: Tue, 12 Dec 2023 08:13:12 +0600 Subject: [PATCH 09/15] fix hands-in exercise --- 100-level-AsyncAPI-Intro/step3.md | 164 ++++++++++++++++++ .../step3/assets/chan-message-errors.yaml | 22 --- .../step3/assets/chan-to-eve.yaml | 19 -- .../step3/assets/chan-to-mars.yaml | 16 -- 100-level-AsyncAPI-Intro/step3/background.sh | 9 - 100-level-AsyncAPI-Intro/step3/text.md | 147 ---------------- 6 files changed, 164 insertions(+), 213 deletions(-) create mode 100644 100-level-AsyncAPI-Intro/step3.md delete mode 100644 100-level-AsyncAPI-Intro/step3/assets/chan-message-errors.yaml delete mode 100644 100-level-AsyncAPI-Intro/step3/assets/chan-to-eve.yaml delete mode 100644 100-level-AsyncAPI-Intro/step3/assets/chan-to-mars.yaml delete mode 100644 100-level-AsyncAPI-Intro/step3/background.sh delete mode 100644 100-level-AsyncAPI-Intro/step3/text.md diff --git a/100-level-AsyncAPI-Intro/step3.md b/100-level-AsyncAPI-Intro/step3.md new file mode 100644 index 0000000..6edde79 --- /dev/null +++ b/100-level-AsyncAPI-Intro/step3.md @@ -0,0 +1,164 @@ +When Chan has to go back to his planet, he wants to keep talking to Eve. Eve is a bit sad that Chan is leaving, but she's also excited to try sending messages across space. They decide that Chan will learn to write AsyncAPI documents so they can stay in touch. + +### Writing an AsyncAPI Document + +#### Starting Simple + +Chan begins by setting up his space message plan. He writes: + +``` +asyncapi: 3.0.0 +info: + title: Sending Signal to Eve + version: 0.1.0 +``` + +This is like Chan saying, "I'm using the `3.0.0` space message rules, and I'm naming my plan `Sending Signal to Eve.`". + +#### Making a Message Route + +Next, Chan picks a path for his message. He makes a channel called `spaceMessage` with the address `Earth/letter`. Now his plan looks like this: + +``` +channels: + spaceMessage: + address: Earth/letter + messages: + lettertoEarth: + description: Communicating with Eve. + payload: + type: object + additionalProperties: false + properties: + fullName: + type: string + age: + type: integer + minimum: 18 +``` + +Here, Chan is planning what to put in his message, like the sender's full name, and their age. + +#### How to Send the Message + +Last, Chan writes how to send the message: + +``` +operations: + spaceMessage: + action: send + channel: + $ref: '#/channels/spaceMessage' +``` + +This part tells his spaceship to send the message using the `spaceMessage` channel. + +### Checking the Document + +Chan uses AsyncAPI Studio to make sure his message plan is good. It's like a helper to check for mistakes. + +He installs it with `npm install -g @asyncapi/studio` and opens his plan in the studio with `asyncapi studio my-document.yaml`. The studio looks for errors and gives tips. + +He also uses the Web version of [AsyncAPI Studio](https://studio.asyncapi.com/) where he can simply paste his document and be able to check if he has any error there. + +--- + +### Chan's Intergalactic Communication Adventure: Your Mission on Capuccinova + +#### Prologue: A Galactic Call to Action + +You have been selected to assist Chan in his quest to maintain an interstellar friendship with Eve and establish a new connection with a friend on the distant planet Capuccinova. Your knowledge in AsyncAPI will be crucial in bridging these cosmic distances. + +#### Chapter 1: The Genesis of a Space Saga + +**Your Mission: Crafting Chan's First AsyncAPI Message** + +1. **Enter the Command Center**: Open the terminal and type `nano chan-to-eve.yaml` to start crafting an interstellar AsyncAPI document for communication with Eve. +2. **Lay the Foundation**: Create the basic structure for Chan's communication. + ```yaml + asyncapi: 3.0.0 + info: + title: Sending Signal to Eve + version: 0.1.0 + channels: + spaceMessage: + address: Earth/letter + messages: + lettertoEarth: + description: Communicating with Eve. + payload: + type: object + additionalProperties: false + properties: + fullName: + type: string + age: + type: integer + minimum: 18 + ``` +3. **Insert a Personal Touch**: Add a `spacename` property. + ```yaml + spacename: + type: string + ``` +4. **Seal the Galactic Message**: Save (`Ctrl + O`, `Enter`) and exit (`Ctrl + X`). + +#### Chapter 2: Deepening the Cosmic Bond + +**Your Mission: Enhancing the Message Structure** + +1. **Revisit the Command Center**: Open `chan-to-eve.yaml` again. +2. **Add a Time Stamp**: Implement `timestamp` and `priority` fields. + ```yaml + timestamp: + type: string + format: date-time + priority: + type: integer + ``` +3. **Chronicle the Changes**: Save (`Ctrl + O`, `Enter`, `Ctrl + X`). + +#### Chapter 3: Navigating the Starry Seas + +**Your Mission: Charting the Message's Course** + +1. **Galactic Navigator**: Edit `chan-to-eve.yaml`. +2. **Set the Course**: Define the sending protocol. + ```yaml + operations: + spaceMessage: + action: send + channel: + $ref: '#/channels/spaceMessage' + ``` +3. **Confirm the Trajectory**: Save (`Ctrl + O`, `Enter`, `Ctrl + X`). + +#### Chapter 4: Expanding to Capuccinova + +**Your Mission: Establishing Communication with Capuccinova** + +1. **New Horizons**: Create `chan-to-capuccinova.yaml` using `nano`. +2. **Capuccinovan Messaging**: Craft a unique communication channel for this exotic planet. +3. **Bridge the Planets**: Save your Capuccinovan communication plan (`Ctrl + O`, `Enter`, `Ctrl + X`). + +#### Chapter 5: Perfecting Distant Dialogues + +**Your Mission: Fine-Tuning the Capuccinova Communication Protocol** + +1. **Cosmic Engineer**: Open `chan-to-capuccinova.yaml`. +2. **Refine the Connection**: Add operations details for Capuccinova. + ```yaml + operations: + capuccinovaMessage: + action: send + channel: + $ref: '#/channels/capuccinovaMessage' + ``` +3. **Launch the Protocol**: Save your work (`Ctrl + O`, `Enter`, `Ctrl + X`). + +#### Epilogue: The Symphony of the Stars + +After each chapter, use **AsyncAPI Studio** to validate Chan's YAML documents, ensuring seamless communication with Eve and the new connection to Capuccinova. Your dedication and skills have not only kept a friendship alive across galaxies but also opened new interstellar pathways. The universe feels more connected thanks to your expertise in crafting these cosmic AsyncAPI communications. + +#### Review and Intergalactic Comparison: +Compare your final AsyncAPI documents with Chan's original ideas to understand different communication strategies in the cosmos and solidify your understanding of AsyncAPI. \ No newline at end of file diff --git a/100-level-AsyncAPI-Intro/step3/assets/chan-message-errors.yaml b/100-level-AsyncAPI-Intro/step3/assets/chan-message-errors.yaml deleted file mode 100644 index 3847553..0000000 --- a/100-level-AsyncAPI-Intro/step3/assets/chan-message-errors.yaml +++ /dev/null @@ -1,22 +0,0 @@ -asyncapi: 3.0.0 -info: - title: Chan's Message to Eve - version: 1.0.0 -channels: - spaceMessage: - address: Eve/letter - messages: - lettertoEarth: - description: Greetings From Chan - payload: - type: object - additionalProperties: false - properties: - fullName: - type: string - email: - type: string - format: email - age: - type: integer - minimum: 18 diff --git a/100-level-AsyncAPI-Intro/step3/assets/chan-to-eve.yaml b/100-level-AsyncAPI-Intro/step3/assets/chan-to-eve.yaml deleted file mode 100644 index 81b5c90..0000000 --- a/100-level-AsyncAPI-Intro/step3/assets/chan-to-eve.yaml +++ /dev/null @@ -1,19 +0,0 @@ -asyncapi: 3.0.0 -info: - title: Chan's Message to Eve - version: 1.0.0 -channels: - spaceMessage: - address: Eve/letter - messages: - lettertoEarth: - description: Greetings From Chan - payload: - type: object - additionalProperties: false - properties: - fullName: - type: string - age: - type: integer - minimum: 118 diff --git a/100-level-AsyncAPI-Intro/step3/assets/chan-to-mars.yaml b/100-level-AsyncAPI-Intro/step3/assets/chan-to-mars.yaml deleted file mode 100644 index 4e29e29..0000000 --- a/100-level-AsyncAPI-Intro/step3/assets/chan-to-mars.yaml +++ /dev/null @@ -1,16 +0,0 @@ -asyncapi: 3.0.0 -info: - title: Message to Mars - version: 0.1.0 -channels: - marsMessage: - address: Mars/greetings - messages: - greetingToMars: - description: Communicating with Mars. - payload: - type: object - additionalProperties: false - properties: - fullName: - type: string \ No newline at end of file diff --git a/100-level-AsyncAPI-Intro/step3/background.sh b/100-level-AsyncAPI-Intro/step3/background.sh deleted file mode 100644 index bc12e14..0000000 --- a/100-level-AsyncAPI-Intro/step3/background.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# Clone the specified repository -git clone https://github.com/asyncapi/learning-paths - -# Change directory into the cloned repository -cd learning-path/100-level-AsyncAPI-Intro/step3/assets - -# Any additional background setup tasks can be added here diff --git a/100-level-AsyncAPI-Intro/step3/text.md b/100-level-AsyncAPI-Intro/step3/text.md deleted file mode 100644 index f5e8e58..0000000 --- a/100-level-AsyncAPI-Intro/step3/text.md +++ /dev/null @@ -1,147 +0,0 @@ -When Chan has to go back to his planet, he wants to keep talking to Eve. Eve is a bit sad that Chan is leaving, but she's also excited to try sending messages across space. They decide that Chan will learn to write AsyncAPI documents so they can stay in touch. - -### Writing an AsyncAPI Document - -#### Starting Simple - -Chan begins by setting up his space message plan. He writes: - -``` -asyncapi: 3.0.0 -info: - title: Sending Signal to Eve - version: 0.1.0 -``` - -This is like Chan saying, "I'm using the `3.0.0` space message rules, and I'm naming my plan `Sending Signal to Eve.`". - -#### Making a Message Route - -Next, Chan picks a path for his message. He makes a channel called `spaceMessage` with the address `Earth/letter`. Now his plan looks like this: - -``` -channels: - spaceMessage: - address: Earth/letter - messages: - lettertoEarth: - description: Communicating with Eve. - payload: - type: object - additionalProperties: false - properties: - fullName: - type: string - age: - type: integer - minimum: 18 -``` - -Here, Chan is planning what to put in his message, like the sender's full name, and their age. - -#### How to Send the Message - -Last, Chan writes how to send the message: - -``` -operations: - spaceMessage: - action: send - channel: - $ref: '#/channels/spaceMessage' -``` - -This part tells his spaceship to send the message using the `spaceMessage` channel. - -### Checking the Document - -Chan uses AsyncAPI Studio to make sure his message plan is good. It's like a helper to check for mistakes. - -He installs it with `npm install -g @asyncapi/studio` and opens his plan in the studio with `asyncapi studio my-document.yaml`. The studio looks for errors and gives tips. - -He also uses the Web version of [AsyncAPI Studio](https://studio.asyncapi.com/) where he can simply paste his document and be able to check if he has any error there. - -### Hands-on Exercise: Guiding Chan's Interstellar Messages to Eve - -Chan wants to practice more. He thinks about adding a new property for a username and creating a new channel for messages to Mars. He updates his document with these new details and then uses AsyncAPI Studio to validate his changes. But he seems to have problem! He needs your help to comminicate with Eve. - -#### Exercise 1: Crafting the Initial Message - -Chan is ready to send his first space message to Eve, but he needs to include a `spacename` in the message format. - -**Your Mission:** - -1. Open the terminal and use the command `nano chan-to-eve.yaml` to edit Chan's draft. -2. In the payload section, insert a new property for the `spacename`: - - ```yaml - spacename: - type: string - ``` - -3. Save and exit the editor. Let Chan know his message structure is set! - -#### Exercise 2: Fixing Communication Errors - -Chan's message plan has some errors that are preventing it from being sent correctly. - -**Your Mission:** - -1. Use `nano chan-message-errors.yaml` in the terminal to open the file with errors. -2. Identify and correct any YAML syntax errors or missing fields. -3. Save your corrections and inform Chan that his message path is now clear. - -#### Exercise 3: Customizing the Message for Eve - -Chan wishes to make his messages more personal with timestamps and priority levels. - -**Your Mission:** - -1. Reopen `chan-to-eve.yaml` in the terminal. -2. Add the message payload with `timestamp` and `priority` fields: - ```yaml - timestamp: - type: string - format: date-time - priority: - type: integer - ``` - -3. Save the file and show Chan how his messages to Eve will now carry these unique details. - -#### Exercise 4: Expanding Communication Channels - -Chan is eager to extend his communication network to a friend on Mars. - -**Your Mission:** -1. Create a new file `chan-to-mars.yaml` using the terminal. -2. Define a `marsMessage` channel with unique properties and an address. -3. After saving, use AsyncAPI Studio to validate the new Martian message route and update Chan on your success. - -Certainly! Here's an additional exercise focusing on the "How to Send the Message" aspect for the `chan-to-mars.yaml` file. - -### Exercise 5: Defining the Message Sending Protocol for Mars Communication - -Now that Chan has set up the basic structure for communicating with Mars, he needs to define the specifics of how the messages will be sent and received. This involves specifying the operations for the `marsMessage` channel in his AsyncAPI document. - -**Your Mission:** - -1. Open `chan-to-mars.yaml` using the terminal command `nano chan-to-mars.yaml`. -2. Add the operations section to define how messages will be sent to and received from Mars. You might structure it like this: - - ```yaml - operations: - marsMessage: - action: send - channel: - $ref: '#/channels/marsMessage' - ``` - -3. Save and exit the editor. Let Chan know that his Mars communication protocol is now defined! - -#### Final Step: - -After completing this task, use AsyncAPI Studio to validate the updated `chan-to-mars.yaml` document to ensure everything is set up correctly for interplanetary communication. - -#### Review and Intergalactic Comparison: -Compare your final AsyncAPI documents with Chan's original ideas to understand different communication strategies in the cosmos and solidify your understanding of AsyncAPI. \ No newline at end of file From e9f3fad3c43ccca20734f5279ed116d741e3769d Mon Sep 17 00:00:00 2001 From: Mahfuza Humayra Mohona Date: Tue, 12 Dec 2023 08:35:29 +0600 Subject: [PATCH 10/15] remove index --- 100-level-AsyncAPI-Intro/index.json | 32 ---------------------------- 100-level-AsyncAPI-Intro/step3.md | 33 ++++++++++++++++++++++------- 2 files changed, 25 insertions(+), 40 deletions(-) delete mode 100644 100-level-AsyncAPI-Intro/index.json diff --git a/100-level-AsyncAPI-Intro/index.json b/100-level-AsyncAPI-Intro/index.json deleted file mode 100644 index 1595415..0000000 --- a/100-level-AsyncAPI-Intro/index.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "title": "100 Level AsyncAPI Intro", - "description": "Introduction of AsyncAPI - 100 Level", - "details": { - "intro": { - "text": "intro.md", - "foreground": "setup_node.sh" - }, - "steps": [ - { - "title": "Event-Driven Architectures", - "text": "step1.md" - }, - { - "title": "AsyncAPI Specification", - "text": "step2.md" - }, - { - "title": "Creating and Validating AsyncAPI Code and Documents", - "text": "step3/text.md", - "background": "step3/background.sh" - } - ], - "finish": { - "text": "finish.md" - } - }, - "backend": { - "imageid": "ubuntu" - } - } - \ No newline at end of file diff --git a/100-level-AsyncAPI-Intro/step3.md b/100-level-AsyncAPI-Intro/step3.md index 6edde79..ff08619 100644 --- a/100-level-AsyncAPI-Intro/step3.md +++ b/100-level-AsyncAPI-Intro/step3.md @@ -19,7 +19,7 @@ This is like Chan saying, "I'm using the `3.0.0` space message rules, and I'm na Next, Chan picks a path for his message. He makes a channel called `spaceMessage` with the address `Earth/letter`. Now his plan looks like this: -``` +```yaml channels: spaceMessage: address: Earth/letter @@ -74,7 +74,9 @@ You have been selected to assist Chan in his quest to maintain an interstellar f **Your Mission: Crafting Chan's First AsyncAPI Message** 1. **Enter the Command Center**: Open the terminal and type `nano chan-to-eve.yaml` to start crafting an interstellar AsyncAPI document for communication with Eve. -2. **Lay the Foundation**: Create the basic structure for Chan's communication. + +2. **Lay the Foundation**: Create the basic structure for Chan's communication: + ```yaml asyncapi: 3.0.0 info: @@ -96,11 +98,14 @@ You have been selected to assist Chan in his quest to maintain an interstellar f type: integer minimum: 18 ``` -3. **Insert a Personal Touch**: Add a `spacename` property. + +3. **Insert a Personal Touch**: Add a `spacename` property: + ```yaml spacename: type: string ``` + 4. **Seal the Galactic Message**: Save (`Ctrl + O`, `Enter`) and exit (`Ctrl + X`). #### Chapter 2: Deepening the Cosmic Bond @@ -108,7 +113,9 @@ You have been selected to assist Chan in his quest to maintain an interstellar f **Your Mission: Enhancing the Message Structure** 1. **Revisit the Command Center**: Open `chan-to-eve.yaml` again. -2. **Add a Time Stamp**: Implement `timestamp` and `priority` fields. + +2. **Add a Time Stamp**: Implement `timestamp` and `priority` fields: + ```yaml timestamp: type: string @@ -116,6 +123,7 @@ You have been selected to assist Chan in his quest to maintain an interstellar f priority: type: integer ``` + 3. **Chronicle the Changes**: Save (`Ctrl + O`, `Enter`, `Ctrl + X`). #### Chapter 3: Navigating the Starry Seas @@ -123,7 +131,9 @@ You have been selected to assist Chan in his quest to maintain an interstellar f **Your Mission: Charting the Message's Course** 1. **Galactic Navigator**: Edit `chan-to-eve.yaml`. -2. **Set the Course**: Define the sending protocol. + +2. **Set the Course**: Define the sending protocol: + ```yaml operations: spaceMessage: @@ -131,6 +141,7 @@ You have been selected to assist Chan in his quest to maintain an interstellar f channel: $ref: '#/channels/spaceMessage' ``` + 3. **Confirm the Trajectory**: Save (`Ctrl + O`, `Enter`, `Ctrl + X`). #### Chapter 4: Expanding to Capuccinova @@ -138,7 +149,9 @@ You have been selected to assist Chan in his quest to maintain an interstellar f **Your Mission: Establishing Communication with Capuccinova** 1. **New Horizons**: Create `chan-to-capuccinova.yaml` using `nano`. + 2. **Capuccinovan Messaging**: Craft a unique communication channel for this exotic planet. + 3. **Bridge the Planets**: Save your Capuccinovan communication plan (`Ctrl + O`, `Enter`, `Ctrl + X`). #### Chapter 5: Perfecting Distant Dialogues @@ -146,7 +159,9 @@ You have been selected to assist Chan in his quest to maintain an interstellar f **Your Mission: Fine-Tuning the Capuccinova Communication Protocol** 1. **Cosmic Engineer**: Open `chan-to-capuccinova.yaml`. -2. **Refine the Connection**: Add operations details for Capuccinova. + +2. **Refine the Connection**: Add operations details for Capuccinova: + ```yaml operations: capuccinovaMessage: @@ -154,11 +169,13 @@ You have been selected to assist Chan in his quest to maintain an interstellar f channel: $ref: '#/channels/capuccinovaMessage' ``` + 3. **Launch the Protocol**: Save your work (`Ctrl + O`, `Enter`, `Ctrl + X`). #### Epilogue: The Symphony of the Stars After each chapter, use **AsyncAPI Studio** to validate Chan's YAML documents, ensuring seamless communication with Eve and the new connection to Capuccinova. Your dedication and skills have not only kept a friendship alive across galaxies but also opened new interstellar pathways. The universe feels more connected thanks to your expertise in crafting these cosmic AsyncAPI communications. -#### Review and Intergalactic Comparison: -Compare your final AsyncAPI documents with Chan's original ideas to understand different communication strategies in the cosmos and solidify your understanding of AsyncAPI. \ No newline at end of file +#### Review and Intergalactic Comparison + +Compare your final AsyncAPI documents with Chan's original ideas to understand different communication strategies in the cosmos and review your understanding of AsyncAPI. \ No newline at end of file From 780845e9fcbdc6899b8d5a4c4ddabe5dcb0698e1 Mon Sep 17 00:00:00 2001 From: Mahfuza Humayra Mohona Date: Sat, 27 Jan 2024 10:55:21 +0600 Subject: [PATCH 11/15] update checking document section --- 100-level-AsyncAPI-Intro/step3.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/100-level-AsyncAPI-Intro/step3.md b/100-level-AsyncAPI-Intro/step3.md index ff08619..57b67a7 100644 --- a/100-level-AsyncAPI-Intro/step3.md +++ b/100-level-AsyncAPI-Intro/step3.md @@ -55,11 +55,7 @@ This part tells his spaceship to send the message using the `spaceMessage` chann ### Checking the Document -Chan uses AsyncAPI Studio to make sure his message plan is good. It's like a helper to check for mistakes. - -He installs it with `npm install -g @asyncapi/studio` and opens his plan in the studio with `asyncapi studio my-document.yaml`. The studio looks for errors and gives tips. - -He also uses the Web version of [AsyncAPI Studio](https://studio.asyncapi.com/) where he can simply paste his document and be able to check if he has any error there. +Chan uses [AsyncAPI Studio](https://studio.asyncapi.com/) to make sure his message plan is good. It's like a helper to check for mistakes. He can simply paste his document and be able to check if he has any error there. --- From 03ba8967fd319c9669584f1b37650a04203113c3 Mon Sep 17 00:00:00 2001 From: Quetzalli Date: Mon, 29 Jan 2024 18:33:33 -0800 Subject: [PATCH 12/15] tw editorial rewrite --- 100-level-AsyncAPI-Intro/step3.md | 93 ++++++++++--------------------- 1 file changed, 30 insertions(+), 63 deletions(-) diff --git a/100-level-AsyncAPI-Intro/step3.md b/100-level-AsyncAPI-Intro/step3.md index 57b67a7..1943790 100644 --- a/100-level-AsyncAPI-Intro/step3.md +++ b/100-level-AsyncAPI-Intro/step3.md @@ -1,10 +1,8 @@ -When Chan has to go back to his planet, he wants to keep talking to Eve. Eve is a bit sad that Chan is leaving, but she's also excited to try sending messages across space. They decide that Chan will learn to write AsyncAPI documents so they can stay in touch. +When Chan has to go back to his planet, he wants to keep talking to Eve. Eve is sad that Chan is leaving, but she's also excited to try sending messages across space. They decide to write AsyncAPI documents to stay in touch. -### Writing an AsyncAPI Document +## Create an AsyncAPI Document -#### Starting Simple - -Chan begins by setting up his space message plan. He writes: +Chan begins by setting up his space message plan. ``` asyncapi: 3.0.0 @@ -13,11 +11,11 @@ info: version: 0.1.0 ``` -This is like Chan saying, "I'm using the `3.0.0` space message rules, and I'm naming my plan `Sending Signal to Eve.`". +Essentially, Chan is saying, "I'm using the `3.0.0` space message rules, and I'm naming my plan `Sending Signal to Eve.`". -#### Making a Message Route +## Message route -Next, Chan picks a path for his message. He makes a channel called `spaceMessage` with the address `Earth/letter`. Now his plan looks like this: +Next, Chan picks a path for his message. He makes a channel called `spaceMessage` with the address `Earth/letter`. ```yaml channels: @@ -37,11 +35,11 @@ channels: minimum: 18 ``` -Here, Chan is planning what to put in his message, like the sender's full name, and their age. -#### How to Send the Message +## Send message + +Last, Chan sends the message via the `spaceMessage` channel. -Last, Chan writes how to send the message: ``` operations: @@ -51,27 +49,16 @@ operations: $ref: '#/channels/spaceMessage' ``` -This part tells his spaceship to send the message using the `spaceMessage` channel. - -### Checking the Document - -Chan uses [AsyncAPI Studio](https://studio.asyncapi.com/) to make sure his message plan is good. It's like a helper to check for mistakes. He can simply paste his document and be able to check if he has any error there. - ---- -### Chan's Intergalactic Communication Adventure: Your Mission on Capuccinova +## Validate AsyncAPI document -#### Prologue: A Galactic Call to Action +Chan uses [AsyncAPI Studio](https://studio.asyncapi.com/) to validate that his messages are working. Studio is a tool that checks for mistakes. He can paste his document into Studio to validate his work. -You have been selected to assist Chan in his quest to maintain an interstellar friendship with Eve and establish a new connection with a friend on the distant planet Capuccinova. Your knowledge in AsyncAPI will be crucial in bridging these cosmic distances. +## Exercise 1: Chan's first AsyncAPI message -#### Chapter 1: The Genesis of a Space Saga +1. Open the terminal and type `nano chan-to-eve.yaml` to create an AsyncAPI document for communication with Eve. -**Your Mission: Crafting Chan's First AsyncAPI Message** - -1. **Enter the Command Center**: Open the terminal and type `nano chan-to-eve.yaml` to start crafting an interstellar AsyncAPI document for communication with Eve. - -2. **Lay the Foundation**: Create the basic structure for Chan's communication: +2. Create the basic structure for Chan's communication: ```yaml asyncapi: 3.0.0 @@ -95,22 +82,20 @@ You have been selected to assist Chan in his quest to maintain an interstellar f minimum: 18 ``` -3. **Insert a Personal Touch**: Add a `spacename` property: +3. Add a `spacename` property: ```yaml spacename: type: string ``` -4. **Seal the Galactic Message**: Save (`Ctrl + O`, `Enter`) and exit (`Ctrl + X`). +4. Save (`Ctrl + O`, `Enter`) and exit (`Ctrl + X`). -#### Chapter 2: Deepening the Cosmic Bond +#### Exercise 2: Message structure -**Your Mission: Enhancing the Message Structure** +1. Open `chan-to-eve.yaml` again. -1. **Revisit the Command Center**: Open `chan-to-eve.yaml` again. - -2. **Add a Time Stamp**: Implement `timestamp` and `priority` fields: +2. Add `timestamp` and `priority` fields: ```yaml timestamp: @@ -120,15 +105,13 @@ You have been selected to assist Chan in his quest to maintain an interstellar f type: integer ``` -3. **Chronicle the Changes**: Save (`Ctrl + O`, `Enter`, `Ctrl + X`). - -#### Chapter 3: Navigating the Starry Seas +3. Save your changes (`Ctrl + O`, `Enter`, `Ctrl + X`). -**Your Mission: Charting the Message's Course** +#### Exercise 3: Charting the Message's Course -1. **Galactic Navigator**: Edit `chan-to-eve.yaml`. +1. Edit `chan-to-eve.yaml`. -2. **Set the Course**: Define the sending protocol: +2. Define the sending protocol: ```yaml operations: @@ -138,25 +121,13 @@ You have been selected to assist Chan in his quest to maintain an interstellar f $ref: '#/channels/spaceMessage' ``` -3. **Confirm the Trajectory**: Save (`Ctrl + O`, `Enter`, `Ctrl + X`). +3. Save your changes (`Ctrl + O`, `Enter`, `Ctrl + X`). -#### Chapter 4: Expanding to Capuccinova +#### Exercise 4: Establish communication with Capuccinova -**Your Mission: Establishing Communication with Capuccinova** +1. Create `chan-to-capuccinova.yaml` using `nano`. -1. **New Horizons**: Create `chan-to-capuccinova.yaml` using `nano`. - -2. **Capuccinovan Messaging**: Craft a unique communication channel for this exotic planet. - -3. **Bridge the Planets**: Save your Capuccinovan communication plan (`Ctrl + O`, `Enter`, `Ctrl + X`). - -#### Chapter 5: Perfecting Distant Dialogues - -**Your Mission: Fine-Tuning the Capuccinova Communication Protocol** - -1. **Cosmic Engineer**: Open `chan-to-capuccinova.yaml`. - -2. **Refine the Connection**: Add operations details for Capuccinova: +2. Add operations details for Capuccinova: ```yaml operations: @@ -166,12 +137,8 @@ You have been selected to assist Chan in his quest to maintain an interstellar f $ref: '#/channels/capuccinovaMessage' ``` -3. **Launch the Protocol**: Save your work (`Ctrl + O`, `Enter`, `Ctrl + X`). - -#### Epilogue: The Symphony of the Stars - -After each chapter, use **AsyncAPI Studio** to validate Chan's YAML documents, ensuring seamless communication with Eve and the new connection to Capuccinova. Your dedication and skills have not only kept a friendship alive across galaxies but also opened new interstellar pathways. The universe feels more connected thanks to your expertise in crafting these cosmic AsyncAPI communications. +3. Save your work (`Ctrl + O`, `Enter`, `Ctrl + X`). -#### Review and Intergalactic Comparison +## Test your work -Compare your final AsyncAPI documents with Chan's original ideas to understand different communication strategies in the cosmos and review your understanding of AsyncAPI. \ No newline at end of file +After each exercise, use **AsyncAPI Studio** to validate Chan's YAML documents. After all, you want to ensure seamless communication with Eve and the new connection to Capuccinova! Thanks to you, Eve and Chan can now keep their friendship alive by communicating across galaxies. \ No newline at end of file From 52108b7de4eb038492d73f4f76b12bcf7692d659 Mon Sep 17 00:00:00 2001 From: Quetzalli Date: Mon, 29 Jan 2024 18:34:24 -0800 Subject: [PATCH 13/15] tw editorial fixes --- 100-level-AsyncAPI-Intro/step3.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/100-level-AsyncAPI-Intro/step3.md b/100-level-AsyncAPI-Intro/step3.md index 1943790..bf2ce4b 100644 --- a/100-level-AsyncAPI-Intro/step3.md +++ b/100-level-AsyncAPI-Intro/step3.md @@ -91,7 +91,7 @@ Chan uses [AsyncAPI Studio](https://studio.asyncapi.com/) to validate that his m 4. Save (`Ctrl + O`, `Enter`) and exit (`Ctrl + X`). -#### Exercise 2: Message structure +## Exercise 2: Message structure 1. Open `chan-to-eve.yaml` again. @@ -107,7 +107,7 @@ Chan uses [AsyncAPI Studio](https://studio.asyncapi.com/) to validate that his m 3. Save your changes (`Ctrl + O`, `Enter`, `Ctrl + X`). -#### Exercise 3: Charting the Message's Course +## Exercise 3: Charting the Message's Course 1. Edit `chan-to-eve.yaml`. @@ -123,7 +123,7 @@ Chan uses [AsyncAPI Studio](https://studio.asyncapi.com/) to validate that his m 3. Save your changes (`Ctrl + O`, `Enter`, `Ctrl + X`). -#### Exercise 4: Establish communication with Capuccinova +## Exercise 4: Establish communication with Capuccinova 1. Create `chan-to-capuccinova.yaml` using `nano`. From 3a08dd52c13d08b887e48365193a9f37d4642446 Mon Sep 17 00:00:00 2001 From: Mahfuza Humayra Mohona Date: Sun, 25 Feb 2024 18:09:52 +0600 Subject: [PATCH 14/15] review addressed --- 100-level-AsyncAPI-Intro/step3.md | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/100-level-AsyncAPI-Intro/step3.md b/100-level-AsyncAPI-Intro/step3.md index bf2ce4b..42fe71f 100644 --- a/100-level-AsyncAPI-Intro/step3.md +++ b/100-level-AsyncAPI-Intro/step3.md @@ -4,7 +4,7 @@ When Chan has to go back to his planet, he wants to keep talking to Eve. Eve is Chan begins by setting up his space message plan. -``` +```yaml asyncapi: 3.0.0 info: title: Sending Signal to Eve @@ -35,13 +35,11 @@ channels: minimum: 18 ``` - ## Send message Last, Chan sends the message via the `spaceMessage` channel. - -``` +```yaml operations: spaceMessage: action: send @@ -49,11 +47,26 @@ operations: $ref: '#/channels/spaceMessage' ``` - ## Validate AsyncAPI document Chan uses [AsyncAPI Studio](https://studio.asyncapi.com/) to validate that his messages are working. Studio is a tool that checks for mistakes. He can paste his document into Studio to validate his work. +## Generator + +Generator automatically writes code in different languages based on Chan's blueprint, saving him time and effort to focus on the real message. + +* Install Generator: + +```bash +npm install -g @asyncapi/generator +``` + +* Generate code from your AsyncAPI file: + +```bash +asyncapi generate fromFile my-api.yaml +``` + ## Exercise 1: Chan's first AsyncAPI message 1. Open the terminal and type `nano chan-to-eve.yaml` to create an AsyncAPI document for communication with Eve. From c3cc030bffbf603ad44317ebe1f9c82b7c2ddae9 Mon Sep 17 00:00:00 2001 From: Mahfuza Humayra Mohona Date: Wed, 28 Feb 2024 09:13:51 +0600 Subject: [PATCH 15/15] remove Test your work section --- 100-level-AsyncAPI-Intro/step3.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/100-level-AsyncAPI-Intro/step3.md b/100-level-AsyncAPI-Intro/step3.md index 42fe71f..2bdcd1f 100644 --- a/100-level-AsyncAPI-Intro/step3.md +++ b/100-level-AsyncAPI-Intro/step3.md @@ -151,7 +151,3 @@ asyncapi generate fromFile my-api.yaml ``` 3. Save your work (`Ctrl + O`, `Enter`, `Ctrl + X`). - -## Test your work - -After each exercise, use **AsyncAPI Studio** to validate Chan's YAML documents. After all, you want to ensure seamless communication with Eve and the new connection to Capuccinova! Thanks to you, Eve and Chan can now keep their friendship alive by communicating across galaxies. \ No newline at end of file