@asyncapi/cli 0.43.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,6 +43,7 @@ export default class Models extends Command {
|
|
|
43
43
|
csharpArrayType: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
44
44
|
csharpHashcode: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
45
45
|
csharpEqual: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
46
|
+
csharpSystemJson: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
46
47
|
};
|
|
47
48
|
run(): Promise<void>;
|
|
48
49
|
}
|
|
@@ -26,7 +26,7 @@ class Models extends base_1.default {
|
|
|
26
26
|
run() {
|
|
27
27
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
28
28
|
const { args, flags } = yield this.parse(Models);
|
|
29
|
-
const { tsModelType, tsEnumType, tsIncludeComments, tsModuleSystem, tsExportType, tsJsonBinPack, namespace, csharpAutoImplement, csharpArrayType, csharpNewtonsoft, csharpHashcode, csharpEqual, packageName, output } = flags;
|
|
29
|
+
const { tsModelType, tsEnumType, tsIncludeComments, tsModuleSystem, tsExportType, tsJsonBinPack, namespace, csharpAutoImplement, csharpArrayType, csharpNewtonsoft, csharpHashcode, csharpEqual, csharpSystemJson, packageName, output } = flags;
|
|
30
30
|
const { language, file } = args;
|
|
31
31
|
const inputFile = (yield (0, SpecificationFile_1.load)(file)) || (yield (0, SpecificationFile_1.load)());
|
|
32
32
|
const { document, status } = yield (0, parser_1.parse)(this, inputFile, flags);
|
|
@@ -94,13 +94,8 @@ class Models extends base_1.default {
|
|
|
94
94
|
if (csharpNewtonsoft) {
|
|
95
95
|
presets.push(modelina_1.CSHARP_NEWTONSOFT_SERIALIZER_PRESET);
|
|
96
96
|
}
|
|
97
|
-
if (
|
|
98
|
-
presets.push(
|
|
99
|
-
preset: modelina_1.CSHARP_DEFAULT_PRESET,
|
|
100
|
-
options: {
|
|
101
|
-
autoImplementedProperties: true
|
|
102
|
-
}
|
|
103
|
-
});
|
|
97
|
+
if (csharpSystemJson) {
|
|
98
|
+
presets.push(modelina_1.CSHARP_JSON_SERIALIZER_PRESET);
|
|
104
99
|
}
|
|
105
100
|
if (csharpHashcode || csharpEqual) {
|
|
106
101
|
presets.push({
|
|
@@ -286,4 +281,8 @@ Models.flags = Object.assign({ help: core_1.Flags.help({ char: 'h' }), output: c
|
|
|
286
281
|
description: 'C# specific, generate the models with the Equal method overwritten',
|
|
287
282
|
required: false,
|
|
288
283
|
default: false
|
|
284
|
+
}), csharpSystemJson: core_1.Flags.boolean({
|
|
285
|
+
description: 'C# specific, generate the models with System.Text.Json serialization support',
|
|
286
|
+
required: false,
|
|
287
|
+
default: false
|
|
289
288
|
}) }, (0, parser_1.validationFlags)({ logDiagnostics: false }));
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.44.0",
|
|
3
3
|
"commands": {
|
|
4
4
|
"bundle": {
|
|
5
5
|
"id": "bundle",
|
|
@@ -586,6 +586,13 @@
|
|
|
586
586
|
"required": false,
|
|
587
587
|
"allowNo": false
|
|
588
588
|
},
|
|
589
|
+
"csharpSystemJson": {
|
|
590
|
+
"name": "csharpSystemJson",
|
|
591
|
+
"type": "boolean",
|
|
592
|
+
"description": "C# specific, generate the models with System.Text.Json serialization support",
|
|
593
|
+
"required": false,
|
|
594
|
+
"allowNo": false
|
|
595
|
+
},
|
|
589
596
|
"log-diagnostics": {
|
|
590
597
|
"name": "log-diagnostics",
|
|
591
598
|
"type": "boolean",
|