Skip to content

Commit

Permalink
chore(release): v0.17.0 (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni authored Jul 30, 2024
1 parent 1c9f34b commit ca90549
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
18 changes: 9 additions & 9 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $ npm install -g @the-codegen-project/cli
$ codegen COMMAND
running command...
$ codegen (--version)
@the-codegen-project/cli/0.16.0 win32-x64 node-v20.15.1
@the-codegen-project/cli/0.17.0 linux-x64 node-v18.20.4
$ codegen --help [COMMAND]
USAGE
$ codegen COMMAND
Expand Down Expand Up @@ -80,7 +80,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.16.0/src/commands/generate.ts)_
_See code: [src/commands/generate.ts](https://github.com/the-codegen-project/cli/blob/v0.17.0/src/commands/generate.ts)_

## `codegen help [COMMAND]`

Expand Down Expand Up @@ -109,23 +109,23 @@ Initialize The Codegen Project in your project
```
USAGE
$ codegen init [--help] [--input-file <value>] [--input-type asyncapi] [--output-directory <value>]
[--config-type esm|json|yaml] [--languages typescript|java] [--no-tty] [--include-payloads] [--include-parameters]
[--include-channels]
[--config-type esm|json|yaml] [--languages typescript|java|csharp] [--no-tty] [--include-payloads]
[--include-parameters] [--include-channels]
FLAGS
--config-type=<option> [default: esm] The type of configuration file. 'esm' can do everything, 'json' and 'yaml'
is more restrictive. Read more here:
https://github.com/the-codegen-project/cli/blob/main/docs/configurations.md
<options: esm|json|yaml>
--help Show CLI help.
--include-channels Include channels generation, available for typescript.
--include-parameters Include parameters generation, available for typescript.
--include-payloads Include payloads generation, available for typescript and java.
--include-channels Include channels generation, available for TypeScript.
--include-parameters Include parameters generation, available for TypeScript.
--include-payloads Include payloads generation, available for TypeScript, Java and C#.
--input-file=<value> Input file for the code generation
--input-type=<option> Input file type
<options: asyncapi>
--languages=<option> Which languages do you wish to generate code for?
<options: typescript|java>
<options: typescript|java|csharp>
--no-tty Do not use an interactive terminal
--output-directory=<value> [default: ./] Output configuration location, path to where the configuration file should
be located. If relative path, the current working directory of the terminal will be used.
Expand All @@ -134,7 +134,7 @@ DESCRIPTION
Initialize The Codegen Project in your project
```

_See code: [src/commands/init.ts](https://github.com/the-codegen-project/cli/blob/v0.16.0/src/commands/init.ts)_
_See code: [src/commands/init.ts](https://github.com/the-codegen-project/cli/blob/v0.17.0/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.16.0",
"version": "0.17.0",
"bin": {
"codegen": "./bin/run.mjs"
},
Expand Down
2 changes: 1 addition & 1 deletion schemas/configuration-schema-0.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
},
"namespace": {
"type": "string",
"default": "__gen__.payloads"
"default": "The.Codegen.Project"
}
},
"additionalProperties": false
Expand Down
6 changes: 3 additions & 3 deletions src/codegen/generators/csharp/payloads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export async function generateCsharpPayload(
presets.push(CSHARP_JSON_SERIALIZER_PRESET);
presets.push({
class: {
additionalContent({ renderer, content, model }) {
additionalContent({renderer, content, model}) {
const supportFunctions = `public string Serialize()
{
return this.Serialize(null);
Expand All @@ -62,7 +62,7 @@ public static ${model.type}? Deserialize(string json)
}`;
return `${content}\n${renderer.indent(supportFunctions)}`;
}
},
}
});
} else if (context.generator.serializationLibrary === 'newtonsoft') {
presets.push(CSHARP_NEWTONSOFT_SERIALIZER_PRESET);
Expand All @@ -78,7 +78,7 @@ public static ${model.name} Deserialize(string json)
{
return JsonConvert.DeserializeObject<${model.name}>(json);
}`);
},
}
}
});
}
Expand Down

0 comments on commit ca90549

Please sign in to comment.