@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.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/utils.ts +12 -1
package/dist/index.cjs
CHANGED
|
@@ -855,8 +855,11 @@ function getOperationParameters(node, options = {}) {
|
|
|
855
855
|
function buildPropertyJSDocComments(schema) {
|
|
856
856
|
const meta = _kubb_core.ast.syncSchemaRef(schema);
|
|
857
857
|
const isArray = meta?.primitive === "array";
|
|
858
|
+
const hasDescription = meta && "description" in meta && meta.description;
|
|
859
|
+
const formatComment = meta && "format" in meta && meta.format ? hasDescription ? [" ", `Format: \`${meta.format}\``] : ["@description", `Format: \`${meta.format}\``] : [];
|
|
858
860
|
return [
|
|
859
|
-
|
|
861
|
+
hasDescription ? `@description ${jsStringEscape(meta.description)}` : null,
|
|
862
|
+
...formatComment,
|
|
860
863
|
meta && "deprecated" in meta && meta.deprecated ? "@deprecated" : null,
|
|
861
864
|
!isArray && meta && "min" in meta && meta.min !== void 0 ? `@minLength ${meta.min}` : null,
|
|
862
865
|
!isArray && meta && "max" in meta && meta.max !== void 0 ? `@maxLength ${meta.max}` : null,
|