( schema: JsonSchema, rootSchema: JsonSchema )
| 167 | * @returns {any} |
| 168 | */ |
| 169 | export const createDefaultValue = ( |
| 170 | schema: JsonSchema, |
| 171 | rootSchema: JsonSchema |
| 172 | ) => { |
| 173 | const defaultValue = doCreateDefaultValue(schema, rootSchema); |
| 174 | |
| 175 | // preserve the backward compatibility where it is returning an empty object if we can't determine the default value |
| 176 | return defaultValue === undefined ? {} : defaultValue; |
| 177 | }; |
| 178 | |
| 179 | /** |
| 180 | * Create a default value based on the given schema. |
no test coverage detected
searching dependent graphs…