Skip to content

Commit

Permalink
Merge branch 'master' into Dule-asyncAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
quetzalliwrites authored Jul 13, 2022
2 parents 8486303 + c82af2e commit 97f5ce4
Show file tree
Hide file tree
Showing 13 changed files with 75 additions and 23 deletions.
10 changes: 10 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,16 @@
"contributions": [
"code"
]
},
{
"login": "paulgoldsmith",
"name": "Paul Goldsmith",
"avatar_url": "https://avatars.githubusercontent.com/u/471550?v=4",
"profile": "https:/paulgoldsmith",
"contributions": [
"code",
"bug"
]
}
],
"contributorsPerLine": 7,
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

---
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![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-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
[![Netlify Status](https://api.netlify.com/api/v1/badges/b2137407-b765-46c4-95b5-a72d9b1592ab/deploy-status)](https://app.netlify.com/sites/asyncapi-website/deploys)

Expand Down Expand Up @@ -138,6 +138,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="http://juanarce.me"><img src="https://avatars.githubusercontent.com/u/30204147?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Juan A.</b></sub></a><br /><a href="https:/asyncapi/website/commits?author=jaas666" title="Code">💻</a></td>
<td align="center"><a href="https:/luphieanza"><img src="https://avatars.githubusercontent.com/u/20577131?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Muhammad Rafly Andrianza</b></sub></a><br /><a href="https:/asyncapi/website/commits?author=luphieanza" title="Documentation">📖</a></td>
<td align="center"><a href="https:/Harish-b-03"><img src="https://avatars.githubusercontent.com/u/69810789?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Harish</b></sub></a><br /><a href="https:/asyncapi/website/commits?author=Harish-b-03" title="Code">💻</a></td>
<td align="center"><a href="https:/paulgoldsmith"><img src="https://avatars.githubusercontent.com/u/471550?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Paul Goldsmith</b></sub></a><br /><a href="https:/asyncapi/website/commits?author=paulgoldsmith" title="Code">💻</a> <a href="https:/asyncapi/website/issues?q=author%3Apaulgoldsmith" title="Bug reports">🐛</a></td>
</tr>
</table>

Expand Down
22 changes: 17 additions & 5 deletions components/campaigns/AnnoucementHero.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,28 @@ export default function AnnouncementHero({ className = '', small = false}) {
if (pathname === '/blog/events2021') return null

return (
<div className={`bg-gray-50 border border-gray-200 py-6 rounded ${className} ${small ? 'mb-4' : 'mb-12'}`}>
<Heading className="countdown-text-gradient" level="h2" typeStyle="heading-lg">
<div
className={`bg-gray-50 border border-gray-200 py-6 rounded ${className} ${
small ? 'mb-4' : 'mb-12'
}`}
>
<Heading
className="countdown-text-gradient"
level="h2"
typeStyle="heading-lg"
>
AsyncAPI Conference 2022
</Heading>
<Paragraph typeStyle="body-lg">
Help us decide on a date and location by filling out a short survey
November 3-5, 2022 | Barcelona, Spain
</Paragraph>
<div className="mt-8 pb-2 space-x-2">
<Button href="https://conference.asyncapi.com/" target="_blank" text="Share your opinion!" />
<Button
href="https://conference.asyncapi.com/"
target="_blank"
text="Learn more"
/>
</div>
</div>
)
);
}
2 changes: 1 addition & 1 deletion components/navigation/MobileNavMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function MobileNavMenu ({
onClickClose = () => {},
}) {
return (
<div className="absolute top-0 inset-x-0 py-2 transition transform origin-top-right max-h-screen lg:hidden overflow-y-scroll">
<div className="fixed top-0 inset-x-0 py-2 transition transform origin-top-right max-h-full lg:hidden overflow-y-scroll">
<div className="rounded-lg shadow-lg">
<div className="rounded-lg shadow-xs bg-white divide-y-2 divide-gray-50">
<div className="pt-5 pb-6 px-5 space-y-6">
Expand Down
16 changes: 13 additions & 3 deletions config/meetings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
[
{
"title": "AsyncAPI Onboarding Workshop - Part 2",
"url": "https:/asyncapi/community/issues/404",
"date": "Wed, 06 Jul 2022 15:00:00 GMT"
"title": "AsyncAPI Conference 2022 organization - round 3",
"url": "https:/asyncapi/community/issues/408",
"date": "Thu, 14 Jul 2022 15:00:00 GMT"
},
{
"title": "AsyncAPI Onboarding Workshop - Part 3",
"url": "https:/asyncapi/community/issues/409",
"date": "Wed, 13 Jul 2022 15:00:00 GMT"
},
{
"title": "Spec 3.0 Meeting",
"url": "https:/asyncapi/community/issues/410",
"date": "Wed, 20 Jul 2022 16:00:00 GMT"
}
]
12 changes: 9 additions & 3 deletions netlify/edge-functions/serve-definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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({
Expand Down Expand Up @@ -127,11 +127,17 @@ 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 = info.json
// /definitions/2.4.0.json => file = 2.4.0.json
const file = splitPath.slice(-1).pop();
const version = splitPath[2].replace(".json", "");

metric.attributes = {
"source": splitPath[1],
"file": splitPath[2],
"file": file,
"url": request.url,
"version": version,
...attributes,
};

Expand Down
4 changes: 2 additions & 2 deletions pages/blog/february-2021-at-asyncapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:/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:/asyncapi/generator/blob/master/docs/authoring.md#react) or have a look at it [here](https:/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:/asyncapi/generator/blob/master/docs/authoring.md#typescript-support). We still cannot use TS in main template code. For more details read [this](https:/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:/asyncapi/generator/blob/master/docs/react-render-engine.md) or have a look at it [here](https:/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:/asyncapi/generator/blob/master/docs/typescript-support.md). We still cannot use TS in main template code. For more details read [this](https:/asyncapi/generator-react-sdk/issues/3).
Check out all the [releases](https:/asyncapi/generator/releases)
Expand Down
2 changes: 1 addition & 1 deletion pages/blog/january-2021-at-asyncapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:/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:/asyncapi/generator/blob/master/docs/authoring.md#react) from the AsyncAPI Generator.
We have a [new template](https:/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:/asyncapi/generator/blob/master/docs/react-render-engine.md) from the AsyncAPI Generator.

## Next major feature is data model generation

Expand Down
4 changes: 2 additions & 2 deletions pages/blog/react-as-generator-engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The [Generator](https:/asyncapi/generator) doesn't use React rendere
}
```

You can find more information about the Generator configuration [here](https:/asyncapi/generator/blob/master/docs/authoring.md#configuration-file).
You can find more information about the Generator configuration [here](https:/asyncapi/generator/blob/master/docs/configuration-file.md).

## How it works

Expand Down Expand Up @@ -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:/asyncapi/generator/blob/master/docs/authoring.md#filters). For example, you want to use one function from [Underscore.string](https:/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:/asyncapi/generator/blob/master/docs/nunjucks-render-engine.md#filters). For example, you want to use one function from [Underscore.string](https:/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
Expand Down
2 changes: 1 addition & 1 deletion pages/blog/using-nunjucks-with-asyncapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:/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:/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.
Expand Down
4 changes: 2 additions & 2 deletions pages/docs/reference/specification/v2.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2294,8 +2294,8 @@ Allows configuration of the supported OAuth Flows.
##### Fixed Fields
Field Name | Type | Description
---|:---:|---
<a name="oauthFlowsImplicit"></a>implicit| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Implicit flow
<a name="oauthFlowsPassword"></a>password| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Resource Owner Protected Credentials flow
<a name="oauthFlowsImplicit"></a>implicit| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Implicit flow.
<a name="oauthFlowsPassword"></a>password| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Resource Owner Protected Credentials flow.
<a name="oauthFlowsClientCredentials"></a>clientCredentials| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Client Credentials flow.
<a name="oauthFlowsAuthorizationCode"></a>authorizationCode| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Authorization Code flow.

Expand Down
3 changes: 2 additions & 1 deletion pages/docs/tools/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ___

## AsyncAPI Tools List

Would you like to add your tool to this list? [Let us know!](https:/asyncapi/asyncapi/issues/new)
Would you like to add your tool to this list? [Let us know!](https:/asyncapi/website/issues/new/choose)
<!--more-->

> Please, before you decide to create a new tool, consider contributing to the existing ones. Thanks!
Expand All @@ -42,6 +42,7 @@ The following is a list of tools that generate AsyncAPI documents from your code
| [Go AsyncAPI](https:/swaggest/go-asyncapi) | It uses reflection to translate Go structures in JSON Schema definitions and arrange them in AsyncAPI schema. Thanks to [@vearutop](https:/vearutop). | Go
| [Saunter](https:/tehmantra/saunter) | Like [Swashbuckle](https:/domaindrivendev/Swashbuckle.AspNetCore) for AsyncAPI. Generates (and hosts) an AsyncAPI schema document from your code. Thanks to [@tehmantra](https:/tehmantra). | C#/dotnet
| [Java AsyncAPI](https:/Pakisan/java-asyncapi) | This is a code-first tool for AsyncAPI specification | Java, Kotlin
| [Kotlin AsyncAPI](https:/OpenFolder/kotlin-asyncapi) | Kotlin DSL based AsyncAPI documentation framework | Kotlin
| [Springwolf](https:/stavshamir/springwolf) | Like [Springfox](https:/springfox/springfox) for AsyncAPI. Auto-generates an AsyncAPI document and a web UI. | Java, Spring Boot
| [KnstEventBus](https:/d0972058277/KnstEventBus) | AsyncApi code-first tools for c#. Generates document and view. | C#
| [sttp tapir](https:/softwaremill/tapir) | Library for describing HTTP endpoints, and then interpreting them as a server, client, or documentation | Scala
Expand Down
14 changes: 13 additions & 1 deletion pages/tools/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ export default function CliPage() {
'Create, validate, and explore your AsyncAPI files with our CLI tool.';
const image = '/img/social/cli-card.jpg';

const getPkgCode = () => {
return `# Download latest PKG file\ncurl -OL https:/asyncapi/cli/releases/latest/download/asyncapi.pkg\n# Install application on MacOS\nsudo installer -pkg asyncapi.pkg -target /`;
};

return (
<GenericLayout title="CLI" description={description} image={image} wide>
<div className="py-12 overflow-hidden">
Expand Down Expand Up @@ -91,7 +95,7 @@ export default function CliPage() {
{renderButtons()}
</div>

<div className="relative max-w-full mt-8 mx-auto space-y-10">
<div className="relative w-full mt-8 mx-auto space-y-10">
<div>
<Heading level="h3" typeStyle="heading-sm-semibold" className="mb-4 text-center md:text-left">
Installing
Expand All @@ -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()
}
]}
/>
</div>
Expand Down

0 comments on commit 97f5ce4

Please sign in to comment.