openapi-ts-request 0.3.0 → 0.3.1

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.
@@ -107,6 +107,7 @@ class ServiceGenerator {
107
107
  namespace: this.config.namespace,
108
108
  interfaceFileName: config_1.interfaceFileName,
109
109
  schemaFileName: config_1.schemaFileName,
110
+ isGenJsonSchemas: this.config.isGenJsonSchemas,
110
111
  });
111
112
  if (this.config.isGenJsonSchemas) {
112
113
  // 处理重复的 schemaName
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openapi-ts-request",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Swagger2/OpenAPI3 to TypeScript, request client, request mock service, enum, type field label, JSON Schemas",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,13 +1,18 @@
1
1
  /* eslint-disable */
2
2
  // @ts-ignore
3
3
  import * as {{ namespace }} from './{{ interfaceFileName }}';
4
+ {%- if isGenJsonSchemas %}
4
5
  import * as schemas from './{{ schemaFileName }}';
6
+ {%- endif %}
7
+
5
8
  {% for api in list -%}
6
9
  import * as {{ api.controllerName }} from './{{ api.fileName }}';
7
10
  {% endfor -%}
8
11
 
9
12
  export default {
13
+ {%- if isGenJsonSchemas %}
10
14
  schemas,
15
+ {%- endif %}
11
16
  {{ namespace }},
12
17
  {% for api in list -%}
13
18
  {{ api.controllerName }},