@kubb/plugin-ts
Advanced tools
+4
-1
@@ -828,4 +828,7 @@ import { t as __name } from "./chunk--u3MIqq1.js"; | ||
| const isArray = meta?.primitive === "array"; | ||
| const hasDescription = meta && "description" in meta && meta.description; | ||
| const formatComment = meta && "format" in meta && meta.format ? hasDescription ? [" ", `Format: \`${meta.format}\``] : ["@description", `Format: \`${meta.format}\``] : []; | ||
| return [ | ||
| meta && "description" in meta && meta.description ? `@description ${jsStringEscape(meta.description)}` : null, | ||
| hasDescription ? `@description ${jsStringEscape(meta.description)}` : null, | ||
| ...formatComment, | ||
| meta && "deprecated" in meta && meta.deprecated ? "@deprecated" : null, | ||
@@ -832,0 +835,0 @@ !isArray && meta && "min" in meta && meta.min !== void 0 ? `@minLength ${meta.min}` : null, |
+1
-1
| { | ||
| "name": "@kubb/plugin-ts", | ||
| "version": "5.0.0-beta.29", | ||
| "version": "5.0.0-beta.30", | ||
| "description": "Generate TypeScript types, interfaces, and enums from your OpenAPI specification. The foundational plugin that powers type safety across the entire Kubb ecosystem.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
+12
-1
@@ -18,4 +18,15 @@ import { jsStringEscape, stringify } from '@internals/utils' | ||
| const hasDescription = meta && 'description' in meta && meta.description | ||
| const formatComment = | ||
| meta && 'format' in meta && meta.format | ||
| ? hasDescription | ||
| ? // Empty line between description and format | ||
| [' ', `Format: \`${meta.format}\``] | ||
| : ['@description', `Format: \`${meta.format}\``] | ||
| : [] | ||
| return [ | ||
| meta && 'description' in meta && meta.description ? `@description ${jsStringEscape(meta.description)}` : null, | ||
| hasDescription ? `@description ${jsStringEscape(meta.description)}` : null, | ||
| ...formatComment, | ||
| meta && 'deprecated' in meta && meta.deprecated ? '@deprecated' : null, | ||
@@ -22,0 +33,0 @@ // minItems/maxItems on arrays should not be emitted as @minLength/@maxLength |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
557817
0.32%6318
0.24%