Skip to content

Commit 69a5ea8

Browse files
authored
Merge branch 'main' into add_asyncapi_blogpost
2 parents fee67d9 + 554a82a commit 69a5ea8

File tree

15 files changed

+1096
-293
lines changed

15 files changed

+1096
-293
lines changed

docs/generators/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ All available generators, across languages and inputs:
2020
| **Inputs** | [`payloads`](./payloads.md) | [`parameters`](./parameters.md) | [`headers`](./headers.md) | [`types`](./types.md) | [`channels`](./channels.md) | [`client`](./client.md) | [`custom`](./custom.md) |
2121
|---|---|---|---|---|---|---|---|
2222
| AsyncAPI | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
23-
| OpenAPI | || ✔️ |||| ✔️ |
23+
| OpenAPI | ✔️ || ✔️ |||| ✔️ |
2424

2525
| **Languages** | [`payloads`](./payloads.md) | [`parameters`](./parameters.md) | [`headers`](./headers.md) | [`types`](./types.md) | [`channels`](./channels.md) | [`client`](./client.md) | [`custom`](./custom.md) |
2626
|---|---|---|---|---|---|---|---|

docs/generators/payloads.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,10 @@ export default {
2020

2121
`payloads` preset is for generating models that represent typed models that can be serialized into message payloads for communication use-cases.
2222

23-
This is supported through the following inputs: [`asyncapi`](#inputs)
23+
This is supported through the following inputs: `asyncapi`, `openapi`
2424

2525
It supports the following languages; [`typescript`](#typescript)
2626

27-
## Inputs
28-
29-
### `asyncapi`
30-
The `payloads` preset with `asyncapi` input generates all the message payloads for each channel in the AsyncAPI document.
31-
32-
The return type is a map of channels and the model that represent the payload.
33-
3427
## Languages
3528
Each language has a set of constraints which means that some typed model types are either supported or not, or it might just be the code generation library that does not yet support it.
3629

docs/inputs/asyncapi.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ The Codegen Project was started because of a need for a code generator that;
1515

1616
There is a lot of overlap with existing tooling, however the idea is to form the same level of quality that the OpenAPI Generator provides to OpenAPI community for HTTP, for AsyncAPI and **any** protocol (including HTTP), and the usability of the Apollo GraphQL generator. How are we gonna achieve it? Together, and a [roadmap](https://github.com/orgs/the-codegen-project/projects/1/views/2).
1717

18+
| **Presets** | AsyncAPI |
19+
|---|---|
20+
| [`payloads`](../generators/payloads.md) | ✔️ |
21+
| [`parameters`](../generators/parameters.md) | ✔️ |
22+
| [`headers`](../generators/headers.md) | ✔️ |
23+
| [`types`](../generators/types.md) | ✔️ |
24+
| [`channels`](../generators/channels.md) | ✔️ |
25+
| [`client`](../generators/client.md) | ✔️ |
26+
| [`custom`](../generators/custom.md) | ✔️ |
27+
1828
## Basic AsyncAPI Document Structure
1929

2030
Here's a complete basic AsyncAPI document example to get you started:

docs/inputs/openapi.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,17 @@ Input support; `openapi`
88

99
- OpenAPI 3.0.x
1010
- OpenAPI 3.1.x
11-
- Swagger 2.0 (legacy support)
11+
- OpenAPI 2.0.0 (Swagger)
12+
13+
| **Presets** | OpenAPI |
14+
|---|---|
15+
| [`payloads`](../generators/payloads.md) | ✔️ |
16+
| [`parameters`](../generators/parameters.md) ||
17+
| [`headers`](../generators/headers.md) | ✔️ |
18+
| [`types`](../generators/types.md) ||
19+
| [`channels`](../generators/channels.md) ||
20+
| [`client`](../generators/client.md) ||
21+
| [`custom`](../generators/custom.md) | ✔️ |
1222

1323
## Basic Usage
1424

examples/README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# Examples
2-
This list of examples shows how you can integrate The Codegen Project into your own projects.
32

4-
## TypeScript
3+
This directory contains practical examples demonstrating how to use The Codegen Project for different use cases.
54

6-
### Simple Library
7-
[Simple TypeScript library that use AsyncAPI as input to generate payload models that is serialized and printed in the console](./typescript-library/).
5+
## Available Examples
86

9-
### Next.JS
10-
[Simple Next.JS server that use AsyncAPI as input to generate payload models that is serialized and printed on the website, works both client and server side](./typescript-nextjs/).
7+
### [TypeScript Library](./typescript-library/)
8+
A complete example showing how to generate a TypeScript library from OpenAPI specifications.
9+
10+
### [TypeScript Next.js](./typescript-nextjs/)
11+
An example demonstrating integration with Next.js applications.
12+
13+
### [E-commerce Payload Models](./ecommerce-payloads/)
14+
A comprehensive example showing how to generate TypeScript payload models from AsyncAPI specifications for an e-commerce order processing system.

src/codegen/generators/helpers/payloads.ts

Lines changed: 0 additions & 159 deletions
This file was deleted.

0 commit comments

Comments
 (0)