@samchon/openapi
Advanced tools
Comparing version 2.0.0-dev.20241122-2 to 2.0.0-dev.20241122-3
@@ -27,3 +27,3 @@ "use strict"; | ||
? v.description | ||
: "".concat(title, "\n\n").concat(v.description); | ||
: "".concat(title, ".\n\n").concat(v.description); | ||
} | ||
@@ -30,0 +30,0 @@ delete v.title; |
@@ -191,14 +191,11 @@ "use strict"; | ||
description: (function () { | ||
var _a; | ||
if (operation.summary && operation.description) { | ||
return operation.description.startsWith(operation.summary) | ||
? operation.description | ||
: [ | ||
operation.summary, | ||
operation.summary.endsWith(".") ? "" : ".", | ||
"\n\n", | ||
operation.description, | ||
].join(""); | ||
} | ||
return (_a = operation.description) !== null && _a !== void 0 ? _a : operation.summary; | ||
var _a, _b; | ||
if (!((_a = operation.summary) === null || _a === void 0 ? void 0 : _a.length) || !((_b = operation.description) === null || _b === void 0 ? void 0 : _b.length)) | ||
return operation.summary || operation.description; | ||
var summary = operation.summary.endsWith(".") | ||
? operation.summary.slice(0, -1) | ||
: operation.summary; | ||
return operation.description.startsWith(summary) | ||
? operation.description | ||
: summary + ".\n\n" + operation.description; | ||
})(), | ||
@@ -205,0 +202,0 @@ deprecated: operation.deprecated, |
@@ -132,3 +132,3 @@ "use strict"; | ||
: {})); | ||
init = __assign(__assign({}, ((_p = props.connection.options) !== null && _p !== void 0 ? _p : {})), { method: props.route.method, headers: (function () { | ||
init = __assign(__assign({}, ((_p = props.connection.options) !== null && _p !== void 0 ? _p : {})), { method: props.route.method.toUpperCase(), headers: (function () { | ||
var e_1, _a, e_2, _b; | ||
@@ -191,3 +191,3 @@ var output = []; | ||
if (!(status === 200 || status === 201)) return [3 /*break*/, 11]; | ||
if (!(props.route.method === "head")) return [3 /*break*/, 2]; | ||
if (!(props.route.method.toUpperCase() === "HEAD")) return [3 /*break*/, 2]; | ||
return [2 /*return*/, out(undefined)]; | ||
@@ -194,0 +194,0 @@ case 2: |
{ | ||
"name": "@samchon/openapi", | ||
"version": "2.0.0-dev.20241122-2", | ||
"version": "2.0.0-dev.20241122-3", | ||
"description": "OpenAPI definitions and converters for 'typia' and 'nestia'.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -34,3 +34,3 @@ import { OpenApi } from "../OpenApi"; | ||
? v.description | ||
: `${title}\n\n${v.description}`; | ||
: `${title}.\n\n${v.description}`; | ||
} | ||
@@ -37,0 +37,0 @@ delete v.title; |
@@ -228,13 +228,10 @@ import { OpenApi } from "../OpenApi"; | ||
description: (() => { | ||
if (operation.summary && operation.description) { | ||
return operation.description.startsWith(operation.summary) | ||
? operation.description | ||
: [ | ||
operation.summary, | ||
operation.summary.endsWith(".") ? "" : ".", | ||
"\n\n", | ||
operation.description, | ||
].join(""); | ||
} | ||
return operation.description ?? operation.summary; | ||
if (!operation.summary?.length || !operation.description?.length) | ||
return operation.summary || operation.description; | ||
const summary: string = operation.summary.endsWith(".") | ||
? operation.summary.slice(0, -1) | ||
: operation.summary; | ||
return operation.description.startsWith(summary) | ||
? operation.description | ||
: summary + ".\n\n" + operation.description; | ||
})(), | ||
@@ -241,0 +238,0 @@ deprecated: operation.deprecated, |
@@ -61,3 +61,3 @@ import type { HttpMigration } from "../HttpMigration"; | ||
...(props.connection.options ?? {}), | ||
method: props.route.method, | ||
method: props.route.method.toUpperCase(), | ||
headers: (() => { | ||
@@ -102,3 +102,3 @@ const output: [string, string][] = []; | ||
// SUCCESS CASE | ||
if (props.route.method === "head") return out(undefined); | ||
if (props.route.method.toUpperCase() === "HEAD") return out(undefined); | ||
else if ( | ||
@@ -105,0 +105,0 @@ props.route.success === null || |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1528868
26397