ng-openapi 0.2.5 → 0.2.6

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.
Files changed (3) hide show
  1. package/cli.cjs +3 -3
  2. package/index.js +2 -2
  3. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -44,7 +44,7 @@ var fs4 = __toESM(require("fs"));
44
44
  var path12 = __toESM(require("path"));
45
45
 
46
46
  // package.json
47
- var version = "0.2.4";
47
+ var version = "0.2.5";
48
48
 
49
49
  // src/lib/core/generator.ts
50
50
  var import_ts_morph7 = require("ts-morph");
@@ -82,7 +82,7 @@ function getTypeScriptType(schemaOrType, config, formatOrNullable, isNullable, c
82
82
  }
83
83
  if (schema.type === "array") {
84
84
  const itemType = schema.items ? getTypeScriptType(schema.items, config, void 0, void 0, context) : "unknown";
85
- return nullable ? `(${itemType}[] | null)` : `${itemType}[]`;
85
+ return nullable ? `(Array<${itemType}> | null)` : `Array<${itemType}>`;
86
86
  }
87
87
  switch (schema.type) {
88
88
  case "string":
@@ -815,7 +815,7 @@ var TypeGenerator = class {
815
815
  }
816
816
  if (schema.type === "array") {
817
817
  const itemType = schema.items ? this.getArrayItemType(schema.items) : "unknown";
818
- return `${itemType}[]`;
818
+ return `Array<${itemType}>`;
819
819
  }
820
820
  if (schema.type === "object") {
821
821
  if (schema.properties) {
package/index.js CHANGED
@@ -152,7 +152,7 @@ function getTypeScriptType(schemaOrType, config, formatOrNullable, isNullable, c
152
152
  }
153
153
  if (schema.type === "array") {
154
154
  const itemType = schema.items ? getTypeScriptType(schema.items, config, void 0, void 0, context) : "unknown";
155
- return nullable ? `(${itemType}[] | null)` : `${itemType}[]`;
155
+ return nullable ? `(Array<${itemType}> | null)` : `Array<${itemType}>`;
156
156
  }
157
157
  switch (schema.type) {
158
158
  case "string":
@@ -936,7 +936,7 @@ var _TypeGenerator = class _TypeGenerator {
936
936
  }
937
937
  if (schema.type === "array") {
938
938
  const itemType = schema.items ? this.getArrayItemType(schema.items) : "unknown";
939
- return `${itemType}[]`;
939
+ return `Array<${itemType}>`;
940
940
  }
941
941
  if (schema.type === "object") {
942
942
  if (schema.properties) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-openapi",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "Generate Angular services and TypeScript types from OpenAPI/Swagger specifications",
5
5
  "keywords": [
6
6
  "ng-openapi",