Skip to content

Commit 50e742a

Browse files
authored
add placeholder for new openapi categories (#48942)
1 parent 0044020 commit 50e742a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/rest/scripts/utils/update-markdown.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,16 @@ async function getMarkdownContent(versions) {
102102
// The file path will be content/rest/<category>/<subcategory>.md
103103
for (const subcategory of subcategories) {
104104
const filepath = path.join('content/rest', category, `${subcategory}.md`)
105+
// If the file already exists on disk, only the `versions` frontmatter
106+
// property is updated. So the TODOCS placeholder values are only used
107+
// when the file is newly created, which is the intention. When the TODOCS
108+
// placeholder is added, it will fail the content linter CI test alerting
109+
// the docs content reviewer to update the file before merging.
105110
markdownUpdates[filepath] = {
106111
data: {
107-
title: subcategory,
108-
shortTitle: subcategory,
109-
intro: '',
112+
title: 'TODOCS',
113+
shortTitle: 'TODOCS',
114+
intro: 'TODOCS',
110115
versions: await convertVersionsToFrontmatter(versions[category][subcategory].versions),
111116
...frontmatterDefaults,
112117
},

0 commit comments

Comments
 (0)