diff --git a/tools/azure-sdk-tools/packaging_tools/sdk_generator.py b/tools/azure-sdk-tools/packaging_tools/sdk_generator.py index bdd77559f3f6..d4d0e0539bef 100644 --- a/tools/azure-sdk-tools/packaging_tools/sdk_generator.py +++ b/tools/azure-sdk-tools/packaging_tools/sdk_generator.py @@ -109,7 +109,10 @@ def get_related_swagger(readme_content: List[str], tag: str) -> List[str]: while idx < len(readme_content): if "```" in readme_content[idx]: break - if ".json" in readme_content[idx] and "Microsoft." in readme_content[idx]: + if ".json" in readme_content[idx] and ( + re.compile(r"\d{4}-\d{1,2}-\d{1,2}").findall(readme_content[idx]) + or "Microsoft." in readme_content[idx] + ): result.append(readme_content[idx].strip("\n -")) idx += 1 break