diff --git a/docs/scripts/gen-docs.ts b/docs/scripts/gen-docs.ts index 6e5e9069f05..5d02d141a5c 100644 --- a/docs/scripts/gen-docs.ts +++ b/docs/scripts/gen-docs.ts @@ -11,7 +11,7 @@ export async function main () { await generateDocs({ configFile, configTemplate }) } -function generateMarkdown (schema: Schema, title: string, level: string, parentVersions: string[] = []) { +function generateMarkdown (schema: Schema, title: string, level: string) { const lines: string[] = [] // Skip private @@ -19,16 +19,6 @@ function generateMarkdown (schema: Schema, title: string, level: string, parentV return [] } - // Versions - const versions = (schema.tags || []).map(t => t.match(/@version (\d+)/)?.[1]).filter(Boolean) - if (!versions.length) { - // Inherit from parent if not specified - versions.push(...parentVersions) - } - if (!versions.includes('3')) { - return [] - } - // Render heading lines.push(`${level} ${title}`, '') @@ -72,7 +62,7 @@ function generateMarkdown (schema: Schema, title: string, level: string, parentV const keys = Object.keys(schema.properties || {}).sort() for (const key of keys) { const val = schema.properties[key] as Schema - const propLines = generateMarkdown(val, `\`${key}\``, level + '#', versions) + const propLines = generateMarkdown(val, `\`${key}\``, level + '#') if (propLines.length) { lines.push('', ...propLines) }