openapi-ts-request 0.1.1 → 0.1.2

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.
@@ -159,6 +159,7 @@ class ServiceGenerator {
159
159
  const result = this.resolveObject(schema);
160
160
  const getDefinesType = () => {
161
161
  if (result === null || result === void 0 ? void 0 : result.type) {
162
+ console.log('888', result);
162
163
  return schema.type === 'object'
163
164
  ? type_1.SchemaObjectType.object
164
165
  : config_1.numberEnum.includes(result.type)
@@ -187,6 +188,7 @@ class ServiceGenerator {
187
188
  schema.isAllowed) {
188
189
  const isEnum = result.isEnum;
189
190
  const typeName = (0, util_1.resolveTypeName)(schemaKey);
191
+ console.log('name:', typeName, getDefinesType());
190
192
  lastTypes.push({
191
193
  typeName,
192
194
  type: getDefinesType(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openapi-ts-request",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Swagger2/OpenAPI3 to TypeScript, Request Client, Request Mock Service, Enum, Display Field Label",
5
5
  "packageManager": "pnpm@9.4.0",
6
6
  "repository": {
@@ -10,7 +10,7 @@
10
10
  "license": "MIT",
11
11
  "author": "rookie-luochao",
12
12
  "main": "dist/index.js",
13
- "types": "index.d.ts",
13
+ "types": "dist/index.d.ts",
14
14
  "bin": {
15
15
  "openapi-ts-request": "dist/cli.js"
16
16
  },
@@ -23,6 +23,7 @@
23
23
  "start": "tsc -w",
24
24
  "build": "tsc",
25
25
  "changeset": "changeset",
26
+ "prepublish:test": "npm run build && np --no-cleanup --yolo --no-publish --any-branch",
26
27
  "lint": "eslint ./src --report-unused-disable-directives --max-warnings=0",
27
28
  "lint:fix": "eslint ./src --report-unused-disable-directives --max-warnings=0 --fix",
28
29
  "test": "rm -rf ./test/apis/ ./test/mocks && npm run build && cd ./test && node ./test.js && cd ..",