@bitstack/ng-query-codegen-openapi 0.0.34 → 0.0.36

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.
@@ -261,8 +261,8 @@ function parseSchemaProperties(schema: any, schemaTypeMap: Record<string, string
261
261
  const quotedPropName = needsQuotes ? `"${propName}"` : propName;
262
262
 
263
263
  // 生成 JSDoc 註解
264
- if (propSchema.description) {
265
- properties.push(` /** ${propSchema.description} */`);
264
+ if (propSchema.title || propSchema.description) {
265
+ properties.push(` /** ${propSchema.title ?? ''} ${propSchema.description ?? ''}*/`);
266
266
  }
267
267
  properties.push(` ${quotedPropName}${optional}: ${propType};`);
268
268
  });
@@ -352,9 +352,10 @@ function getTypeFromSchema(schema: any, schemaTypeMap: Record<string, string> =
352
352
  const quotedKey = needsQuotes ? `"${key}"` : key;
353
353
 
354
354
  // 生成 JSDoc 註解
355
- if (propSchema.description) {
356
- props.push(`${nextIndent}/** ${propSchema.description} */`);
355
+ if (propSchema.title || propSchema.description) {
356
+ props.push(`${nextIndent}/** ${propSchema.title ?? ''} ${propSchema.description ?? ''}*/`);
357
357
  }
358
+
358
359
  props.push(`${nextIndent}${quotedKey}${optional}: ${type};`);
359
360
  });
360
361