mushroom-cli 1.2.0-alpha.2 → 1.2.0-alpha.3

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.
package/README.md CHANGED
@@ -88,16 +88,18 @@ Disable checking for update:
88
88
 
89
89
  ## Version
90
90
 
91
+ ### 1.2.0-alpha.3
92
+
93
+ Fixed bugs:
94
+
95
+ * Generate wrong required field for view parameter
96
+
91
97
  ### 1.2.0-alpha.2
92
98
 
93
99
  New features:
94
100
 
95
101
  * Support merge command
96
102
 
97
- Fixed bugs:
98
-
99
- * Generate wrong required field for view parameter
100
-
101
103
  ### 1.2.0-alpha.1
102
104
 
103
105
  New features:
@@ -93,7 +93,7 @@ function generateTypescriptClass(objectDefination, indent, options) {
93
93
 
94
94
  function generateTypescriptClassFromViewParameters(parameters) {
95
95
  if (Array.isArray(parameters)){
96
- return '{\n' + parameters.map(p => ` ${p.field}${p.validation?.required && p.validation.defaultValue === undefined ? "" : "?"}: ${getCSharpTypeFromMushroomType(p.type || "string")}${p.isArray ? "[]" : ""}`).join(',\n') + '\n}';
96
+ return '{\n' + parameters.map(p => ` ${p.field}${p.validation?.required && p.defaultValue === undefined ? "" : "?"}: ${getCSharpTypeFromMushroomType(p.type || "string")}${p.isArray ? "[]" : ""}`).join(',\n') + '\n}';
97
97
  }
98
98
  return '{}';
99
99
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mushroom-cli",
3
- "version": "1.2.0-alpha.2",
3
+ "version": "1.2.0-alpha.3",
4
4
  "description": "Mushroom CLI",
5
5
  "main": "mr.js",
6
6
  "scripts": {