diff --git a/src/macrofier/engine.mjs b/src/macrofier/engine.mjs index efe4607a..0696e5ff 100644 --- a/src/macrofier/engine.mjs +++ b/src/macrofier/engine.mjs @@ -484,42 +484,6 @@ const promoteAndNameSubSchemas = (obj) => { return obj } -const skip = ['NavigationIntent'] -const findAll = (tag, obj, transform) => { - if (Array.isArray(obj)) { - obj.forEach(item => findAll(tag, item, transform)) - } - else if (obj && (typeof obj === "object")) { - Object.keys(obj).forEach(key => { - if (!skip.includes(key)) { - if (key === tag) { - if (obj[key].find(schema => schema.$ref.endsWith('/ListenResponse'))) { - - } - else { - Object.assign(obj, transform(obj)) - delete obj[key] - console.dir(obj) - findAll(tag, obj, transform) - } - } - else { - findAll(tag, obj[key], transform) - } - } - }) - } -} - -const mergeAnyOfs = (obj) => { - // make a copy so we don't polute our inputs - obj = JSON.parse(JSON.stringify(obj)) - - findAll('anyOf', obj, anyOf => mergeAnyOf(anyOf)) - -return obj -} - const generateMacros = (obj, templates, languages, options = {}) => { if (options.createPolymorphicMethods) { let methods = [] @@ -541,11 +505,6 @@ const generateMacros = (obj, templates, languages, options = {}) => { obj = promoteAndNameSubSchemas(obj) } - // config.mergeAnyOfs = true - // if (config.mergeAnyOfs) { - // obj = mergeAnyOfs(obj) - // } - // grab the options so we don't have to pass them from method to method Object.assign(state, options) diff --git a/src/shared/modules.mjs b/src/shared/modules.mjs index 768356f0..81335115 100644 --- a/src/shared/modules.mjs +++ b/src/shared/modules.mjs @@ -1112,9 +1112,6 @@ const addComponentSubSchemasName = (obj, schemas) => { key = key.charAt(0).toUpperCase() + key.substring(1) componentSchema = addComponentSubSchemasNameForProperties(key, componentSchema) }) - if (!schema.title && !key) { - schema.title = capitalize(key) - } }) return schemas