@samchon/openapi
Advanced tools
Comparing version 0.1.14-dev.20240415-2 to 0.1.14-dev.20240415-3
@@ -280,6 +280,6 @@ "use strict"; | ||
union.push({ type: "null" }); | ||
return Object.assign(Object.assign({}, (union.length === 0 | ||
return Object.assign(Object.assign(Object.assign({}, (union.length === 0 | ||
? { type: undefined } | ||
: union.length === 1 | ||
? Object.assign({}, union[0]) : { oneOf: union })), attribute); | ||
? Object.assign({}, union[0]) : { oneOf: union.map((u) => (Object.assign(Object.assign({}, u), { nullable: undefined }))) })), attribute), { nullable: undefined }); | ||
}; | ||
@@ -286,0 +286,0 @@ let TypeChecker; |
@@ -143,3 +143,3 @@ "use strict"; | ||
union.push(Object.assign(Object.assign({}, schema), { | ||
properites: schema.properties | ||
properties: schema.properties | ||
? Object.fromEntries(Object.entries(schema.properties) | ||
@@ -165,6 +165,6 @@ .filter(([_, v]) => v !== undefined) | ||
union.push({ type: "null" }); | ||
return Object.assign(Object.assign({}, (union.length === 0 | ||
return Object.assign(Object.assign(Object.assign({}, (union.length === 0 | ||
? { type: undefined } | ||
: union.length === 1 | ||
? Object.assign({}, union[0]) : { oneOf: union })), attribute); | ||
? Object.assign({}, union[0]) : { oneOf: union.map((u) => (Object.assign(Object.assign({}, u), { nullable: undefined }))) })), attribute), { nullable: undefined }); | ||
}; | ||
@@ -171,0 +171,0 @@ let TypeChecker; |
@@ -201,2 +201,3 @@ "use strict"; | ||
var _a; | ||
// NULLABLE PROPERTY | ||
if (schema["x-nullable"] === | ||
@@ -224,3 +225,3 @@ true) | ||
union.push(Object.assign(Object.assign({}, schema), { | ||
properites: schema.properties | ||
properties: schema.properties | ||
? Object.fromEntries(Object.entries(schema.properties) | ||
@@ -246,6 +247,6 @@ .filter(([_, v]) => v !== undefined) | ||
union.push({ type: "null" }); | ||
return Object.assign(Object.assign({}, (union.length === 0 | ||
return Object.assign(Object.assign(Object.assign({}, (union.length === 0 | ||
? { type: undefined } | ||
: union.length === 1 | ||
? Object.assign({}, union[0]) : { oneOf: union })), attribute); | ||
? Object.assign({}, union[0]) : { oneOf: union.map((u) => (Object.assign(Object.assign({}, u), { "x-nullable": undefined }))) })), attribute), { "x-nullable": undefined }); | ||
}; | ||
@@ -252,0 +253,0 @@ let TypeChecker; |
{ | ||
"name": "@samchon/openapi", | ||
"version": "0.1.14-dev.20240415-2", | ||
"version": "0.1.14-dev.20240415-3", | ||
"description": "OpenAPI definitions and converters for 'typia' and 'nestia'.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -473,4 +473,5 @@ import { OpenApi } from "../OpenApi"; | ||
? { ...union[0] } | ||
: { oneOf: union }), | ||
: { oneOf: union.map((u) => ({ ...u, nullable: undefined })) }), | ||
...attribute, | ||
...{ nullable: undefined }, | ||
}; | ||
@@ -477,0 +478,0 @@ }; |
@@ -248,3 +248,3 @@ import { OpenApi } from "../OpenApi"; | ||
...{ | ||
properites: schema.properties | ||
properties: schema.properties | ||
? Object.fromEntries( | ||
@@ -279,4 +279,5 @@ Object.entries(schema.properties) | ||
? { ...union[0] } | ||
: { oneOf: union }), | ||
: { oneOf: union.map((u) => ({ ...u, nullable: undefined })) }), | ||
...attribute, | ||
...{ nullable: undefined }, | ||
}; | ||
@@ -283,0 +284,0 @@ }; |
@@ -260,2 +260,3 @@ import { OpenApi } from "../OpenApi"; | ||
const visit = (schema: SwaggerV2.IJsonSchema): void => { | ||
// NULLABLE PROPERTY | ||
if ( | ||
@@ -293,3 +294,3 @@ (schema as SwaggerV2.IJsonSchema.__ISignificant<any>)["x-nullable"] === | ||
...{ | ||
properites: schema.properties | ||
properties: schema.properties | ||
? Object.fromEntries( | ||
@@ -328,4 +329,5 @@ Object.entries(schema.properties) | ||
? { ...union[0] } | ||
: { oneOf: union }), | ||
: { oneOf: union.map((u) => ({ ...u, "x-nullable": undefined })) }), | ||
...attribute, | ||
...{ "x-nullable": undefined }, | ||
}; | ||
@@ -332,0 +334,0 @@ }; |
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
170813
4293