MCPcopy Create free account
hub / github.com/loopbackio/loopback-next / getDefault

Function getDefault

packages/cli/generators/openapi/schema-helper.js:38–44  ·  view source on GitHub ↗
(schema, options)

Source from the content-addressed store, hash-verified

36}
37
38function getDefault(schema, options) {
39 let defaultVal = '';
40 if (options && options.includeDefault && schema.default !== undefined) {
41 defaultVal = ' = ' + printSpecObject(schema.default);
42 }
43 return defaultVal;
44}
45
46function getBaseName(tsFileName) {
47 if (tsFileName.endsWith('.ts')) {

Callers 4

mapCompositeTypeFunction · 0.85
mapArrayTypeFunction · 0.85
mapObjectTypeFunction · 0.85
mapPrimitiveTypeFunction · 0.85

Calls 1

printSpecObjectFunction · 0.85

Tested by

no test coverage detected