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
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,6 @@ Get an overview of how to contribute to the project






1 change: 1 addition & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,6 @@ Prefix that follows specification is not enough though. Remember that the title






1 change: 1 addition & 0 deletions docs/migrations/v0.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,4 @@ const subscriber = await jetStreamPullSubscribeToReceiveUserSignedup({




6 changes: 3 additions & 3 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $ npm install -g @the-codegen-project/cli
$ codegen COMMAND
running command...
$ codegen (--version)
@the-codegen-project/cli/0.55.0 linux-x64 node-v18.20.8
@the-codegen-project/cli/0.55.1 linux-x64 node-v18.20.8
$ codegen --help [COMMAND]
USAGE
$ codegen COMMAND
Expand Down Expand Up @@ -84,7 +84,7 @@ DESCRIPTION
Generate code based on your configuration, use `init` to get started.
```

_See code: [src/commands/generate.ts](https://github.com/the-codegen-project/cli/blob/v0.55.0/src/commands/generate.ts)_
_See code: [src/commands/generate.ts](https://github.com/the-codegen-project/cli/blob/v0.55.1/src/commands/generate.ts)_

## `codegen help [COMMAND]`

Expand Down Expand Up @@ -142,7 +142,7 @@ DESCRIPTION
Initialize The Codegen Project in your project
```

_See code: [src/commands/init.ts](https://github.com/the-codegen-project/cli/blob/v0.55.0/src/commands/init.ts)_
_See code: [src/commands/init.ts](https://github.com/the-codegen-project/cli/blob/v0.55.1/src/commands/init.ts)_

## `codegen version`

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@the-codegen-project/cli",
"description": "CLI to work with code generation in any environment",
"version": "0.55.0",
"version": "0.55.1",
"bin": {
"codegen": "./bin/run.mjs"
},
Expand Down
7 changes: 4 additions & 3 deletions src/codegen/inputs/asyncapi/generators/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ export function unwrap(channelParameters: ConstrainedObjectModel) {
);

const parameterInitializer = Object.values(channelParameters.properties)
.filter(parameter => parameter.property.options.const?.value === undefined)
.filter(
(parameter) => parameter.property.options.const?.value === undefined
)
.map((parameter) => {
if (parameter.property.options.isNullable) {
return `${parameter.propertyName}: null`;
Expand All @@ -94,8 +96,7 @@ export function unwrap(channelParameters: ConstrainedObjectModel) {
return `${parameter.propertyName}: ${property.ref.values[0].value}`;
}
return `${parameter.propertyName}: ''`;
}
);
});

return `const parameters = new ${channelParameters.name}({${parameterInitializer.join(', ')}});
const match = msgSubject.match(regex);
Expand Down