@trapi/metadata
Advanced tools
Comparing version 1.0.0-alpha.4 to 1.0.0-alpha.5
@@ -109,3 +109,7 @@ "use strict"; | ||
const property = type.properties[i]; | ||
const propertyDefaultValue = initializerValue[property.name]; | ||
let propertyDefaultValue = property.default; | ||
if (typeof propertyDefaultValue === 'undefined' && | ||
(0, locter_1.isObject)(initializerValue)) { | ||
propertyDefaultValue = initializerValue[property.name]; | ||
} | ||
let propertyRequired = !this.parameter.questionToken; | ||
@@ -117,3 +121,3 @@ if (propertyRequired) { | ||
...details, | ||
default: property.default || propertyDefaultValue, | ||
default: propertyDefaultValue, | ||
description: property.description || details.description || this.getParameterDescription(), | ||
@@ -120,0 +124,0 @@ name: property.name, |
{ | ||
"name": "@trapi/metadata", | ||
"version": "1.0.0-alpha.4", | ||
"version": "1.0.0-alpha.5", | ||
"description": "Generate REST-API metadata scheme from TypeScript Decorators.", | ||
@@ -58,3 +58,3 @@ "main": "./dist/index.js", | ||
}, | ||
"gitHead": "520c8f53bab866f9650eb3137fce9389ef39c95a" | ||
"gitHead": "bde00d70f5b1eef3d66e715d13feb286271a3e1d" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
383954
5175