@kubb/plugin-ts 5.0.0-beta.29 → 5.0.0-beta.30

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.js CHANGED
@@ -825,8 +825,11 @@ function getOperationParameters(node, options = {}) {
825
825
  function buildPropertyJSDocComments(schema) {
826
826
  const meta = ast.syncSchemaRef(schema);
827
827
  const isArray = meta?.primitive === "array";
828
+ const hasDescription = meta && "description" in meta && meta.description;
829
+ const formatComment = meta && "format" in meta && meta.format ? hasDescription ? [" ", `Format: \`${meta.format}\``] : ["@description", `Format: \`${meta.format}\``] : [];
828
830
  return [
829
- meta && "description" in meta && meta.description ? `@description ${jsStringEscape(meta.description)}` : null,
831
+ hasDescription ? `@description ${jsStringEscape(meta.description)}` : null,
832
+ ...formatComment,
830
833
  meta && "deprecated" in meta && meta.deprecated ? "@deprecated" : null,
831
834
  !isArray && meta && "min" in meta && meta.min !== void 0 ? `@minLength ${meta.min}` : null,
832
835
  !isArray && meta && "max" in meta && meta.max !== void 0 ? `@maxLength ${meta.max}` : null,