Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/generators/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ All available generators, across languages and inputs:
| **Inputs** | [`payloads`](./payloads.md) | [`parameters`](./parameters.md) | [`headers`](./headers.md) | [`types`](./types.md) | [`channels`](./channels.md) | [`client`](./client.md) | [`custom`](./custom.md) |
|---|---|---|---|---|---|---|---|
| AsyncAPI | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| OpenAPI | | ➗ | ✔️ | ➗ | ➗ | ➗ | ✔️ |
| OpenAPI | ✔️ | ➗ | ✔️ | ➗ | ➗ | ➗ | ✔️ |

| **Languages** | [`payloads`](./payloads.md) | [`parameters`](./parameters.md) | [`headers`](./headers.md) | [`types`](./types.md) | [`channels`](./channels.md) | [`client`](./client.md) | [`custom`](./custom.md) |
|---|---|---|---|---|---|---|---|
Expand Down
9 changes: 1 addition & 8 deletions docs/generators/payloads.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,10 @@ export default {

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

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

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

## Inputs

### `asyncapi`
The `payloads` preset with `asyncapi` input generates all the message payloads for each channel in the AsyncAPI document.

The return type is a map of channels and the model that represent the payload.

## Languages
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.

Expand Down
10 changes: 10 additions & 0 deletions docs/inputs/asyncapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ The Codegen Project was started because of a need for a code generator that;

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).

| **Presets** | AsyncAPI |
|---|---|
| [`payloads`](../generators/payloads.md) | ✔️ |
| [`parameters`](../generators/parameters.md) | ✔️ |
| [`headers`](../generators/headers.md) | ✔️ |
| [`types`](../generators/types.md) | ✔️ |
| [`channels`](../generators/channels.md) | ✔️ |
| [`client`](../generators/client.md) | ✔️ |
| [`custom`](../generators/custom.md) | ✔️ |

## Basic AsyncAPI Document Structure

Here's a complete basic AsyncAPI document example to get you started:
Expand Down
12 changes: 11 additions & 1 deletion docs/inputs/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@ Input support; `openapi`

- OpenAPI 3.0.x
- OpenAPI 3.1.x
- Swagger 2.0 (legacy support)
- OpenAPI 2.0.0 (Swagger)

| **Presets** | OpenAPI |
|---|---|
| [`payloads`](../generators/payloads.md) | ✔️ |
| [`parameters`](../generators/parameters.md) | ➗ |
| [`headers`](../generators/headers.md) | ✔️ |
| [`types`](../generators/types.md) | ➗ |
| [`channels`](../generators/channels.md) | ➗ |
| [`client`](../generators/client.md) | ➗ |
| [`custom`](../generators/custom.md) | ✔️ |

## Basic Usage

Expand Down
16 changes: 10 additions & 6 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Examples
This list of examples shows how you can integrate The Codegen Project into your own projects.

## TypeScript
This directory contains practical examples demonstrating how to use The Codegen Project for different use cases.

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

### Next.JS
[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/).
### [TypeScript Library](./typescript-library/)
A complete example showing how to generate a TypeScript library from OpenAPI specifications.

### [TypeScript Next.js](./typescript-nextjs/)
An example demonstrating integration with Next.js applications.

### [E-commerce Payload Models](./ecommerce-payloads/)
A comprehensive example showing how to generate TypeScript payload models from AsyncAPI specifications for an e-commerce order processing system.
159 changes: 0 additions & 159 deletions src/codegen/generators/helpers/payloads.ts

This file was deleted.

Loading