openapi-sync 1.0.9 → 1.0.11

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.
@@ -145,12 +145,17 @@ const parseSchemaToType = (apiDoc, schema, name, isRequired, options) => {
145
145
  //parse object key one at a time
146
146
  const objKeys = Object.keys(schema.properties);
147
147
  const requiredKeys = schema.required || [];
148
- type += "{\n";
148
+ let typeCnt = "";
149
149
  objKeys.forEach((key) => {
150
150
  var _a;
151
- type += `${(0, exports.parseSchemaToType)(apiDoc, (_a = schema.properties) === null || _a === void 0 ? void 0 : _a[key], key, requiredKeys.includes(key), options)}`;
151
+ typeCnt += `${(0, exports.parseSchemaToType)(apiDoc, (_a = schema.properties) === null || _a === void 0 ? void 0 : _a[key], key, requiredKeys.includes(key), options)}`;
152
152
  });
153
- type += "}";
153
+ if (typeCnt.length > 0) {
154
+ type += `{\n${typeCnt}}`;
155
+ }
156
+ else {
157
+ type += "object";
158
+ }
154
159
  }
155
160
  }
156
161
  }
package/package.json CHANGED
@@ -1,12 +1,25 @@
1
1
  {
2
2
  "name": "openapi-sync",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "sync openapi variables",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "bin": {
8
8
  "openapi-sync": "./bin/cli.js"
9
9
  },
10
+ "keywords": [
11
+ "openapi",
12
+ "rest",
13
+ "api",
14
+ "swagger",
15
+ "typescript",
16
+ "ts",
17
+ "dts",
18
+ "node",
19
+ "codegen",
20
+ "generation",
21
+ "generator"
22
+ ],
10
23
  "files": [
11
24
  "bin",
12
25
  "dist",