Installing
@@ -105,6 +109,14 @@ export default function CliPage() {
language: 'npm',
code: `npm install -g @asyncapi/cli`,
},
+ {
+ language: 'brew',
+ code: `brew install asyncapi`
+ },
+ {
+ language: '.pkg',
+ code: getPkgCode()
+ }
]}
/>
From 1feddf5d7f84bb3331f3127740d20d87d5829123 Mon Sep 17 00:00:00 2001
From: Sergio Moya <1083296+smoya@users.noreply.github.com>
Date: Tue, 5 Jul 2022 13:08:11 +0200
Subject: [PATCH 06/13] fix: set proper 'file' on metrics sent to NR (#865)
---
netlify/edge-functions/serve-definitions.ts | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/netlify/edge-functions/serve-definitions.ts b/netlify/edge-functions/serve-definitions.ts
index 4121f6a4ab6..36a955ee05d 100644
--- a/netlify/edge-functions/serve-definitions.ts
+++ b/netlify/edge-functions/serve-definitions.ts
@@ -62,7 +62,7 @@ function buildRewrite(originalRequest: Request): (Request | null) {
if (extractResult === null) {
return null;
}
-
+
const definitionVersion = extractResult[1];
const file = extractResult[2];
let url: string;
@@ -73,7 +73,7 @@ function buildRewrite(originalRequest: Request): (Request | null) {
} else {
url = URL_DEST_DEFINITIONS + `/${definitionVersion}${file}`;
}
-
+
return new Request(url, {
method: originalRequest.method,
headers: new Headers({
@@ -127,10 +127,14 @@ function newNRMetricCount(name: string, request: Request, attributes: any = {}):
metric["interval.ms"] = 1;
const splitPath = new URL(request.url).pathname.split("/");
+ // Examples:
+ // /definitions/2.4.0/info.json => file = 2.4.0/info.json
+ // /definitions/2.4.0.json => file = 2.4.0.json
+ let file = splitPath.slice(2, splitPath.length).join("/");
metric.attributes = {
"source": splitPath[1],
- "file": splitPath[2],
+ "file": file,
"url": request.url,
...attributes,
};
From 068c2b5f2021b829fae2b948a756ed803883268f Mon Sep 17 00:00:00 2001
From: Sergio Moya <1083296+smoya@users.noreply.github.com>
Date: Tue, 5 Jul 2022 14:20:51 +0200
Subject: [PATCH 07/13] feat: add 'version' field to metrics sent to NR (#866)
---
netlify/edge-functions/serve-definitions.ts | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/netlify/edge-functions/serve-definitions.ts b/netlify/edge-functions/serve-definitions.ts
index 36a955ee05d..762e40b516c 100644
--- a/netlify/edge-functions/serve-definitions.ts
+++ b/netlify/edge-functions/serve-definitions.ts
@@ -128,14 +128,16 @@ function newNRMetricCount(name: string, request: Request, attributes: any = {}):
const splitPath = new URL(request.url).pathname.split("/");
// Examples:
- // /definitions/2.4.0/info.json => file = 2.4.0/info.json
+ // /definitions/2.4.0/info.json => file = info.json
// /definitions/2.4.0.json => file = 2.4.0.json
- let file = splitPath.slice(2, splitPath.length).join("/");
+ const file = splitPath.slice(-1).pop();
+ const version = splitPath[2].replace(".json", "");
metric.attributes = {
"source": splitPath[1],
"file": file,
"url": request.url,
+ "version": version,
...attributes,
};
From 27480823f8281615332ef95208ad502baca0c100 Mon Sep 17 00:00:00 2001
From: Florence Njeri <40742916+Florence-Njeri@users.noreply.github.com>
Date: Wed, 6 Jul 2022 05:38:29 +0300
Subject: [PATCH 08/13] fix: refactor generator/docs links to match PR #793
refactor (#845)
* refactor links that are linked to the generator docs directory due to PR #793 refactor of authoring.md file
* refactor links that are linked to the generator docs directory due to PR #793 refactor of authoring.md file
Co-authored-by: Lukasz Gornicki
Co-authored-by: Alejandra Quetzalli
---
pages/blog/february-2021-at-asyncapi.md | 4 ++--
pages/blog/january-2021-at-asyncapi.md | 2 +-
pages/blog/react-as-generator-engine.md | 4 ++--
pages/blog/using-nunjucks-with-asyncapi.md | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/pages/blog/february-2021-at-asyncapi.md b/pages/blog/february-2021-at-asyncapi.md
index 275cadda90e..c1d2265f774 100644
--- a/pages/blog/february-2021-at-asyncapi.md
+++ b/pages/blog/february-2021-at-asyncapi.md
@@ -168,8 +168,8 @@ We are very noisy :sweat_smile:
- [Maciej Urbanczyk](https://www.linkedin.com/in/maciej-urba%C5%84czyk-909547164/) and [I](https://twitter.com/derberq) (I mean me :smiley:) pushed some features to the AsyncAPI Generator:
- It supports the latest Node.js 15 and npm 7
- You can now install generator templates globally. For more details, read [this](https://github.com/asyncapi/generator/#global-templates-installed-with-yarn-or-npm) new section in the readme.
- - It is now much easier to generate multiple files using the new React render engine. For more details, read [this](https://github.com/asyncapi/generator/blob/master/docs/authoring.md#react) or have a look at it [here](https://github.com/asyncapi/template-for-generator-templates/blob/master/template/schemas/schema.js#L10)
- - Some parts of templates can be written in TypeScript. For more details, read [this](https://github.com/asyncapi/generator/blob/master/docs/authoring.md#typescript-support). We still cannot use TS in main template code. For more details read [this](https://github.com/asyncapi/generator-react-sdk/issues/3).
+ - It is now much easier to generate multiple files using the new React render engine. For more details, read [this](https://github.com/asyncapi/generator/blob/master/docs/react-render-engine.md) or have a look at it [here](https://github.com/asyncapi/template-for-generator-templates/blob/master/template/schemas/schema.js#L10)
+ - Some parts of templates can be written in TypeScript. For more details, read [this](https://github.com/asyncapi/generator/blob/master/docs/typescript-support.md). We still cannot use TS in main template code. For more details read [this](https://github.com/asyncapi/generator-react-sdk/issues/3).
Check out all the [releases](https://github.com/asyncapi/generator/releases)
diff --git a/pages/blog/january-2021-at-asyncapi.md b/pages/blog/january-2021-at-asyncapi.md
index 8ac4c4e8606..e6fe2d51337 100644
--- a/pages/blog/january-2021-at-asyncapi.md
+++ b/pages/blog/january-2021-at-asyncapi.md
@@ -91,7 +91,7 @@ Spoiler alert -> number of developers using AsyncAPI in production tripled in 20
## TypeScript NATS template
-We have a [new template](https://github.com/asyncapi/ts-nats-template) available. You can use this template to generate [NATS](https://nats.io/) client based on the AsyncAPI document for Node.js. Interesting fact: it is already using the new [React render engine](https://github.com/asyncapi/generator/blob/master/docs/authoring.md#react) from the AsyncAPI Generator.
+We have a [new template](https://github.com/asyncapi/ts-nats-template) available. You can use this template to generate [NATS](https://nats.io/) client based on the AsyncAPI document for Node.js. Interesting fact: it is already using the new [React render engine](https://github.com/asyncapi/generator/blob/master/docs/react-render-engine.md) from the AsyncAPI Generator.
## Next major feature is data model generation
diff --git a/pages/blog/react-as-generator-engine.md b/pages/blog/react-as-generator-engine.md
index 8bf18870f01..3d5bedfbe72 100644
--- a/pages/blog/react-as-generator-engine.md
+++ b/pages/blog/react-as-generator-engine.md
@@ -54,7 +54,7 @@ The [Generator](https://github.com/asyncapi/generator) doesn't use React rendere
}
```
-You can find more information about the Generator configuration [here](https://github.com/asyncapi/generator/blob/master/docs/authoring.md#configuration-file).
+You can find more information about the Generator configuration [here](https://github.com/asyncapi/generator/blob/master/docs/configuration-file.md).
## How it works
@@ -146,7 +146,7 @@ Looking at both examples we see that in Nujucks we operate on string literals, i
### Using third party packages
-Using helper functions from third-party packages, in Nunjucks you must apply them as [filters](https://github.com/asyncapi/generator/blob/master/docs/authoring.md#filters). For example, you want to use one function from [Underscore.string](https://github.com/esamattis/underscore.string) library like **cleanDiacritics**, which replaces diacritic characters with closest ASCII equivalents. To do this, you must create a function inside **filters** folder to convert the function to Nunjucks's filter:
+Using helper functions from third-party packages, in Nunjucks you must apply them as [filters](https://github.com/asyncapi/generator/blob/master/docs/nunjucks-render-engine.md#filters). For example, you want to use one function from [Underscore.string](https://github.com/esamattis/underscore.string) library like **cleanDiacritics**, which replaces diacritic characters with closest ASCII equivalents. To do this, you must create a function inside **filters** folder to convert the function to Nunjucks's filter:
```js
// filters/cleanDiacritics.js
diff --git a/pages/blog/using-nunjucks-with-asyncapi.md b/pages/blog/using-nunjucks-with-asyncapi.md
index f1d973e5277..1ab1069d0a5 100644
--- a/pages/blog/using-nunjucks-with-asyncapi.md
+++ b/pages/blog/using-nunjucks-with-asyncapi.md
@@ -13,7 +13,7 @@ authors:
---
> **Edit 14.04.2021**
-In this post, I explain how you can use Nunjucks to template information extracted from an AsyncAPI file. I also write how you can make it even easier using Nunjucks inside the AsyncAPI Generator. Now, we also have a [React-based](https://github.com/asyncapi/generator/blob/master/docs/authoring.md#react) render engine inside the generator, and it is far more developer-friendly. I encourage you to try it out.
+In this post, I explain how you can use Nunjucks to template information extracted from an AsyncAPI file. I also write how you can make it even easier using Nunjucks inside the AsyncAPI Generator. Now, we also have a [React-based](https://github.com/asyncapi/generator/blob/master/docs/react-render-engine.md) render engine inside the generator, and it is far more developer-friendly. I encourage you to try it out.
Specifications exist for a reason. Among other things, they help to bring quality, consistency, and standardize a given area. They are a great use case for templating engines. You can prepare a template that generates something from any document that follows a particular specification. You can generate whatever you want, docs, code, and diagrams. The sky is the limit.
From af98ca95eb481e0de4720ed9239f180236e0e030 Mon Sep 17 00:00:00 2001
From: asyncapi-bot
Date: Thu, 7 Jul 2022 02:34:16 +0200
Subject: [PATCH 09/13] chore: update meetings.json (#868)
---
config/meetings.json | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/config/meetings.json b/config/meetings.json
index e02634e7a6a..f9f5f7e7219 100644
--- a/config/meetings.json
+++ b/config/meetings.json
@@ -1,12 +1,12 @@
[
{
- "title": "AsyncAPI Onboarding Workshop - Part 2",
- "url": "https://github.com/asyncapi/community/issues/404",
- "date": "Wed, 06 Jul 2022 15:00:00 GMT"
+ "title": "AsyncAPI Conference 2022 organization - round 3",
+ "url": "https://github.com/asyncapi/community/issues/408",
+ "date": "Thu, 14 Jul 2022 15:00:00 GMT"
},
{
- "title": "Spec 3.0 Meeting",
- "url": "https://github.com/asyncapi/community/issues/407",
- "date": "Wed, 06 Jul 2022 16:00:00 GMT"
+ "title": "AsyncAPI Onboarding Workshop - Part 3",
+ "url": "https://github.com/asyncapi/community/issues/409",
+ "date": "Wed, 13 Jul 2022 15:00:00 GMT"
}
]
\ No newline at end of file
From b096452c416ebae84bb8f953129ecbab496f6269 Mon Sep 17 00:00:00 2001
From: asyncapi-bot
Date: Fri, 8 Jul 2022 02:35:15 +0200
Subject: [PATCH 10/13] chore: update meetings.json (#869)
---
config/meetings.json | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/config/meetings.json b/config/meetings.json
index f9f5f7e7219..cdf4bd61bb3 100644
--- a/config/meetings.json
+++ b/config/meetings.json
@@ -8,5 +8,10 @@
"title": "AsyncAPI Onboarding Workshop - Part 3",
"url": "https://github.com/asyncapi/community/issues/409",
"date": "Wed, 13 Jul 2022 15:00:00 GMT"
+ },
+ {
+ "title": "Community Meeting",
+ "url": "https://github.com/asyncapi/community/issues/411",
+ "date": "Tue, 12 Jul 2022 08:00:00 GMT"
}
]
\ No newline at end of file
From 34b2f69ece0f2d2a8aae351b8c986222c155bedf Mon Sep 17 00:00:00 2001
From: "allcontributors[bot]"
<46447321+allcontributors[bot]@users.noreply.github.com>
Date: Tue, 12 Jul 2022 16:23:31 +0200
Subject: [PATCH 11/13] docs: add paulgoldsmith as a contributor for code, bug
(#858)
---
.all-contributorsrc | 10 ++++++++++
README.md | 3 ++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.all-contributorsrc b/.all-contributorsrc
index 9634702982f..df6e6cc9b53 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -263,6 +263,16 @@
"contributions": [
"code"
]
+ },
+ {
+ "login": "paulgoldsmith",
+ "name": "Paul Goldsmith",
+ "avatar_url": "https://avatars.githubusercontent.com/u/471550?v=4",
+ "profile": "https://github.com/paulgoldsmith",
+ "contributions": [
+ "code",
+ "bug"
+ ]
}
],
"contributorsPerLine": 7,
diff --git a/README.md b/README.md
index 88ffdf8f366..c6940332593 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
---
-[![All Contributors](https://img.shields.io/badge/all_contributors-24-orange.svg?style=flat-square)](#contributors-)
+[![All Contributors](https://img.shields.io/badge/all_contributors-25-orange.svg?style=flat-square)](#contributors-)
[![Netlify Status](https://api.netlify.com/api/v1/badges/b2137407-b765-46c4-95b5-a72d9b1592ab/deploy-status)](https://app.netlify.com/sites/asyncapi-website/deploys)
@@ -138,6 +138,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
Juan A. 💻 |
Muhammad Rafly Andrianza 📖 |
Harish 💻 |
+ Paul Goldsmith 💻 🐛 |
From 9440aeb6639d6928853553f27159bb01d680d75d Mon Sep 17 00:00:00 2001
From: Lorenz Simon <39913716+lorenzsimon@users.noreply.github.com>
Date: Wed, 13 Jul 2022 01:25:02 +0200
Subject: [PATCH 12/13] docs: add Kotlin AsyncAPI to community tools list
(#867)
---
pages/docs/tools/index.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pages/docs/tools/index.md b/pages/docs/tools/index.md
index a2f479466c7..574fff1df50 100644
--- a/pages/docs/tools/index.md
+++ b/pages/docs/tools/index.md
@@ -28,7 +28,7 @@ ___
## AsyncAPI Tools List
-Would you like to add your tool to this list? [Let us know!](https://github.com/asyncapi/asyncapi/issues/new)
+Would you like to add your tool to this list? [Let us know!](https://github.com/asyncapi/website/issues/new/choose)
> Please, before you decide to create a new tool, consider contributing to the existing ones. Thanks!
@@ -42,6 +42,7 @@ The following is a list of tools that generate AsyncAPI documents from your code
| [Go AsyncAPI](https://github.com/swaggest/go-asyncapi) | It uses reflection to translate Go structures in JSON Schema definitions and arrange them in AsyncAPI schema. Thanks to [@vearutop](https://github.com/vearutop). | Go
| [Saunter](https://github.com/tehmantra/saunter) | Like [Swashbuckle](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) for AsyncAPI. Generates (and hosts) an AsyncAPI schema document from your code. Thanks to [@tehmantra](https://github.com/tehmantra). | C#/dotnet
| [Java AsyncAPI](https://github.com/Pakisan/java-asyncapi) | This is a code-first tool for AsyncAPI specification | Java, Kotlin
+| [Kotlin AsyncAPI](https://github.com/OpenFolder/kotlin-asyncapi) | Kotlin DSL based AsyncAPI documentation framework | Kotlin
| [Springwolf](https://github.com/stavshamir/springwolf) | Like [Springfox](https://github.com/springfox/springfox) for AsyncAPI. Auto-generates an AsyncAPI document and a web UI. | Java, Spring Boot
| [KnstEventBus](https://github.com/d0972058277/KnstEventBus) | AsyncApi code-first tools for c#. Generates document and view. | C#
| [sttp tapir](https://github.com/softwaremill/tapir) | Library for describing HTTP endpoints, and then interpreting them as a server, client, or documentation | Scala
From c82af2e9b489e1f56df2cc7f526b4d9958ee3094 Mon Sep 17 00:00:00 2001
From: asyncapi-bot
Date: Wed, 13 Jul 2022 02:31:31 +0200
Subject: [PATCH 13/13] chore: update meetings.json (#873)
---
config/meetings.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/config/meetings.json b/config/meetings.json
index cdf4bd61bb3..7b9e5743ce7 100644
--- a/config/meetings.json
+++ b/config/meetings.json
@@ -10,8 +10,8 @@
"date": "Wed, 13 Jul 2022 15:00:00 GMT"
},
{
- "title": "Community Meeting",
- "url": "https://github.com/asyncapi/community/issues/411",
- "date": "Tue, 12 Jul 2022 08:00:00 GMT"
+ "title": "Spec 3.0 Meeting",
+ "url": "https://github.com/asyncapi/community/issues/410",
+ "date": "Wed, 20 Jul 2022 16:00:00 GMT"
}
]
\ No newline at end of file