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
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
- 💫 Regenerate once the input changes
- 👀 Integrate it into any project (such as [Next.JS](./examples/typescript-nextjs), [TypeScript Libraries](./examples/typescript-library), you name it.)
- 💅 [Create custom generators to your use-case](https://the-codegen-project.org/docs/generators/custom)
- 🗄️ Protocol agnostic generator ([NATS](https://the-codegen-project.org/docs/protocols/nats), [Kafka](https://the-codegen-project.org/docs/protocols/kafka), [MQTT](https://the-codegen-project.org/docs/protocols/mqtt), [AMQP](https://the-codegen-project.org/docs/protocols/amqp), [event-source](https://the-codegen-project.org/docs/protocols/eventsource), [HTTP Client](https://the-codegen-project.org/docs/protocols/http_client), read the [docs](https://the-codegen-project.org/docs#protocols) for the full list and information)
- 🗄️ Protocol agnostic generator ([NATS](https://the-codegen-project.org/docs/protocols/nats), [Kafka](https://the-codegen-project.org/docs/protocols/kafka), [MQTT](https://the-codegen-project.org/docs/protocols/mqtt), [AMQP](https://the-codegen-project.org/docs/protocols/amqp), [event-source](https://the-codegen-project.org/docs/protocols/eventsource), [HTTP Client](https://the-codegen-project.org/docs/protocols/http_client), [WebSocket](https://the-codegen-project.org/docs/protocols/websocket), read the [docs](https://the-codegen-project.org/docs#protocols) for the full list and information)
- ⭐ And much more...

# How it works
Expand Down Expand Up @@ -232,6 +232,12 @@ Besides the [milestones](https://github.com/the-codegen-project/cli/milestones),

# 📃 Resources
People who have been so kind to write or talk about The Codegen Project;
- [AsyncAPI - Simplifying Channels Into One](https://the-codegen-project.org/blog/asyncapi-client-generator/)
- [AsyncAPI - Protocol-Specific Messaging Functions](https://the-codegen-project.org/blog/asyncapi-channel-generator/)
- [AsyncAPI - Dynamic Channel Routing Made Type-Safe](https://the-codegen-project.org/blog/asyncapi-parameters-generator/)
- [AsyncAPI - Type safety Never Publish to Wrong Channels Again](https://the-codegen-project.org/blog/asyncapi-types-generator/)
- [AsyncAPI - Type-Safe Headers](https://the-codegen-project.org/blog/asyncapi-headers-generator/)
- [AsyncAPI - Stop wasting time on payloads](https://the-codegen-project.org/blog/asyncapi-payload-generator)
- [The Codegen Project - 1 Months of Progress](https://the-codegen-project.org/blog/update-2)
- [The Codegen Project - AsyncAPI Extensions](https://the-codegen-project.org/blog/asyncapi-customizing-outputs)
- [The Codegen Project - 5 Months of Progress](https://the-codegen-project.org/blog/update-1)
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Each protocol has its own limitations, corner cases, and features; thus, each ha
- [MQTT](./protocols/mqtt.md)
- [EventSource](./protocols/eventsource.md)
- [HTTP Client](./protocols/http_client.md)
- [WebSocket client and server](./protocols/websocket.md)

### [Migrations](./contributing.md)
Get an overview of how to contribute to the project
Expand Down
5 changes: 3 additions & 2 deletions docs/generators/channels.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ export default {

`channels` preset with `asyncapi` input generates support functions for each operation based on the selected protocol.

This generator uses `payloads` and `parameters` generators, in case you dont have any defined, it will automatically include them with default values.
This generator uses [`payloads`](./payloads.md), [`headers`](./headers.md) and [`parameters`](./parameters.md) generators, in case you dont have any defined, it will automatically include them with default values.

This is supported through the following inputs: [`asyncapi`](../inputs/asyncapi.md)

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

It supports the following protocols; [`nats`](../protocols/nats.md), [`kafka`](../protocols/kafka.md), [`mqtt`](../protocols/mqtt.md), [`amqp`](../protocols/amqp.md), [`event_source`](../protocols/eventsource.md), [`http_client`](../protocols/http_client.md)
It supports the following protocols; [`nats`](../protocols/nats.md), [`kafka`](../protocols/kafka.md), [`mqtt`](../protocols/mqtt.md), [`amqp`](../protocols/amqp.md), [`event_source`](../protocols/eventsource.md), [`http_client`](../protocols/http_client.md), [`websocket`](../protocols/websocket.md)

## Options
These are the available options for the `channels` generator;
Expand All @@ -50,6 +50,7 @@ Depending on which protocol, these are the dependencies:
- `AMQP`: https://github.com/amqp-node/amqplib v0
- `EventSource`: `event_source_fetch`: https://github.com/Azure/fetch-event-source v2, `event_source_express`: https://github.com/expressjs/express v4
- `HTTP`: https://github.com/node-fetch/node-fetch v2
- `WebSocket`: https://github.com/websockets/ws v8

NodeFetch

Expand Down
7 changes: 5 additions & 2 deletions docs/inputs/asyncapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The Codegen Project was started because of a need for a code generator that;
3. forms a community across communities in languages and standards
4. are financially sustainable long term through open source at it's core.

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

| **Presets** | AsyncAPI |
|---|---|
Expand Down Expand Up @@ -914,7 +914,10 @@ The AsyncAPI Generator is like the core of the Codegen Project, however it does
Yes! You can define operations with different protocol bindings in the same AsyncAPI document. Use the `x-the-codegen-project` extension to specify which generators to use for each operation.

### How do I handle versioning?
Use the `info.version` field in your AsyncAPI document and consider using separate documents for major version changes. You can also use channel addressing patterns to include version information.

Short answer: Use the `info.version` field in your AsyncAPI document and consider using separate documents for major version changes. You can also use channel addressing patterns to include version information.

Long answer: It's hard to version APIs, there are tons of resources how to handle versioning of your API which is far beyond what we can offer here.

### Can I customize the generated code structure?
Yes, use the `x-the-codegen-project` extension properties to customize channel names, function mappings, and other generation aspects. If you want full control, use the [custom preset](../generators/custom.md)
Loading
Loading