diff --git a/languages/markdown/templates/schemas/default.md b/languages/markdown/templates/schemas/default.md index e414558c..504f5c69 100644 --- a/languages/markdown/templates/schemas/default.md +++ b/languages/markdown/templates/schemas/default.md @@ -6,8 +6,6 @@ ${schema.description} ${schema.shape} ``` -Additional properties: ${schema.additionalProperties} - See also: ${schema.seeAlso} --- diff --git a/languages/markdown/templates/types/additionalProperties.md b/languages/markdown/templates/types/additionalProperties.md new file mode 100644 index 00000000..0439b567 --- /dev/null +++ b/languages/markdown/templates/types/additionalProperties.md @@ -0,0 +1 @@ + [property: string]: ${type} \ No newline at end of file diff --git a/src/macrofier/engine.mjs b/src/macrofier/engine.mjs index c2a303ba..2d27b125 100644 --- a/src/macrofier/engine.mjs +++ b/src/macrofier/engine.mjs @@ -945,12 +945,6 @@ function generateSchemas(json, templates, options) { content = content.replace(/\$\{schema.example\}/, schema.examples.map(ex => JSON.stringify(ex, null, ' ')).join('\n\n')) } - if (schema.additionalProperties) { - content = content.replace(/\$\{schema.additionalProperties\}/, JSON.stringify(schema.additionalProperties, null, ' ')) - } else { - content = content.replace(/.*\$\{schema.additionalProperties\}/, '') - } - let seeAlso = getRelatedSchemaLinks(schema, json, templates, options) if (seeAlso) { content = content.replace(/\$\{schema.seeAlso\}/, '\n\n' + seeAlso)