Generators
Generators, or preset's are the core of The Codegen Project, that determines what is generated for your project.
Each language and inputs have specific generators;
payloadsTyped payload and message models that serialize straight into your wire format.parametersParameter models that interpolate values into subjects, topics and URL paths.headersMessage header models, with optional runtime validation of what arrives.typesType aliases and enums derived from the constraints already in your document.channelsProtocol-specific publish, subscribe, request and reply functions per operation.clientOne class wrapping the channel functions, with connection handling built in.modelsPlain typed models via Modelina, with none of the messaging machinery.customYour own render function, fed the parsed document and other generators’ output.| Inputs | payloads | parameters | headers | types | channels | client | models | custom |
|---|---|---|---|---|---|---|---|---|
| AsyncAPI | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| OpenAPI | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| JSON Schema | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ |
OpenAPI
channelsandclientgenerate an HTTP client — see theopenapi-http-clientexample. OpenAPIchannelscan also generate the server side with thehttp_serverprotocol — see theopenapi-http-serverexample.
| Languages | payloads | parameters | headers | types | channels | client | models | custom |
|---|---|---|---|---|---|---|---|---|
| TypeScript | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |