diff --git a/.github/scripts/generate_descriptor_pages.main.kts b/.github/scripts/generate_descriptor_pages.main.kts index 9cfb574d1..01e407de5 100755 --- a/.github/scripts/generate_descriptor_pages.main.kts +++ b/.github/scripts/generate_descriptor_pages.main.kts @@ -165,6 +165,7 @@ fun StringBuilder.appendElement( appendReferences(element.references) element.description?.trim()?.let { appendLine("$it\n") } appendDeprecationVersion(element.deprecatedSince) + appendNamespace(element.namespace) appendSupportDetails(element.sdkDocsSupportDetails) appendRequirement(element.requirement) appendDefaultValue(element.defaultValue) @@ -232,6 +233,15 @@ fun StringBuilder.appendDeprecationVersion(deprecatedSince: String?) { appendLine("since $deprecatedSince\n") } +fun StringBuilder.appendNamespace(namespace: String?) { + namespace ?: return + appendLine("{type=\"narrow\"}") + appendLine("Namespace") + appendLine(":") + appendLine("`$namespace`") + appendLine() +} + fun StringBuilder.appendSupportDetails(supportDetails: String?) { supportDetails ?: return appendLine("{type=\"narrow\"}") @@ -524,6 +534,7 @@ data class Element( var name: String? = null, var descriptiveName: String? = null, var sdkDocsFixedPath: List = emptyList(), + var namespace: String? = null, var since: String? = null, var until: String? = null, var deprecatedSince: String? = null,