@rexeus/typeweaver-types 0.10.4 → 0.10.5

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/dist/index.cjs CHANGED
@@ -53,6 +53,7 @@ function writeRequestType(templateFilePath, resourceName, operation, context) {
53
53
  const content = context.renderTemplate(templateFilePath, {
54
54
  pascalCaseOperationId: (0, polycase.pascalCase)(operationId),
55
55
  method,
56
+ requestJsDoc: (0, _rexeus_typeweaver_gen.createJSDocComment)(operation.summary),
56
57
  headerTsType: header ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(header)) : void 0,
57
58
  queryTsType: query ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(query)) : void 0,
58
59
  paramTsType: param ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(param)) : void 0,
@@ -12914,7 +12915,8 @@ function createOwnResponseTemplateData(response, responseFactoryTemplateFile, co
12914
12915
  typeValue: response.name,
12915
12916
  statusCodeKey: _rexeus_typeweaver_core.HttpStatusCode[response.statusCode],
12916
12917
  hasHeader,
12917
- hasBody
12918
+ hasBody,
12919
+ jsDoc: (0, _rexeus_typeweaver_gen.createJSDocComment)(response.description)
12918
12920
  };
12919
12921
  return {
12920
12922
  ...factoryData,
@@ -12933,7 +12935,8 @@ function writeCanonicalResponseType(templateFile, responseFactoryTemplateFile, r
12933
12935
  typeValue: response.name,
12934
12936
  statusCodeKey: _rexeus_typeweaver_core.HttpStatusCode[response.statusCode],
12935
12937
  hasHeader: response.header !== void 0,
12936
- hasBody: response.body !== void 0
12938
+ hasBody: response.body !== void 0,
12939
+ jsDoc: (0, _rexeus_typeweaver_gen.createJSDocComment)(response.description)
12937
12940
  };
12938
12941
  const content = context.renderTemplate(templateFile, {
12939
12942
  coreDir: context.coreDir,
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import path from "node:path";
2
2
  import { fileURLToPath } from "node:url";
3
- import { BasePlugin } from "@rexeus/typeweaver-gen";
3
+ import { BasePlugin, createJSDocComment } from "@rexeus/typeweaver-gen";
4
4
  import { fromZod, print } from "@rexeus/typeweaver-zod-to-ts";
5
5
  import { camelCase, pascalCase } from "polycase";
6
6
  import { HttpStatusCode } from "@rexeus/typeweaver-core";
@@ -32,6 +32,7 @@ function writeRequestType(templateFilePath, resourceName, operation, context) {
32
32
  const content = context.renderTemplate(templateFilePath, {
33
33
  pascalCaseOperationId: pascalCase(operationId),
34
34
  method,
35
+ requestJsDoc: createJSDocComment(operation.summary),
35
36
  headerTsType: header ? print(fromZod(header)) : void 0,
36
37
  queryTsType: query ? print(fromZod(query)) : void 0,
37
38
  paramTsType: param ? print(fromZod(param)) : void 0,
@@ -12893,7 +12894,8 @@ function createOwnResponseTemplateData(response, responseFactoryTemplateFile, co
12893
12894
  typeValue: response.name,
12894
12895
  statusCodeKey: HttpStatusCode[response.statusCode],
12895
12896
  hasHeader,
12896
- hasBody
12897
+ hasBody,
12898
+ jsDoc: createJSDocComment(response.description)
12897
12899
  };
12898
12900
  return {
12899
12901
  ...factoryData,
@@ -12912,7 +12914,8 @@ function writeCanonicalResponseType(templateFile, responseFactoryTemplateFile, r
12912
12914
  typeValue: response.name,
12913
12915
  statusCodeKey: HttpStatusCode[response.statusCode],
12914
12916
  hasHeader: response.header !== void 0,
12915
- hasBody: response.body !== void 0
12917
+ hasBody: response.body !== void 0,
12918
+ jsDoc: createJSDocComment(response.description)
12916
12919
  };
12917
12920
  const content = context.renderTemplate(templateFile, {
12918
12921
  coreDir: context.coreDir,