docs-util: fix clean script removing Auth tags (#8911)

* docs-util: fix clean script removing Auth tags

* fix removal of response types other than json
This commit is contained in:
Shahed Nasser
2024-08-30 17:02:02 +03:00
committed by GitHub
parent b9eac4402b
commit dea5af085a
3 changed files with 34 additions and 4 deletions
@@ -26,6 +26,11 @@ const ignoreSchemas = [
"AuthStoreSessionResponse",
]
const ignoreTags = {
admin: ["Auth"],
store: ["Auth"]
}
export default async function () {
const oasOutputBasePath = getOasOutputBasePath()
const oasOperationsPath = path.join(oasOutputBasePath, "operations")
@@ -225,7 +230,7 @@ export default async function () {
const lengthBefore = parsedBaseYaml.tags?.length || 0
parsedBaseYaml.tags = parsedBaseYaml.tags?.filter((tag) =>
areaTags.has(tag.name)
areaTags.has(tag.name) || ignoreTags[area].includes(tag.name)
)
if (lengthBefore !== (parsedBaseYaml.tags?.length || 0)) {