Skip to content

Commit 44860eb

Browse files
msyycl0lawrence
authored andcommitted
[sdk generation pipeline] fix logic to extract swagger file (Azure#38334)
* fix logic to extract swagger file * fix logic to extract swagger file
1 parent de106dc commit 44860eb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/azure-sdk-tools/packaging_tools/sdk_generator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ def get_related_swagger(readme_content: List[str], tag: str) -> List[str]:
109109
while idx < len(readme_content):
110110
if "```" in readme_content[idx]:
111111
break
112-
if ".json" in readme_content[idx] and "Microsoft." in readme_content[idx]:
112+
if ".json" in readme_content[idx] and (
113+
re.compile(r"\d{4}-\d{1,2}-\d{1,2}").findall(readme_content[idx])
114+
or "Microsoft." in readme_content[idx]
115+
):
113116
result.append(readme_content[idx].strip("\n -"))
114117
idx += 1
115118
break

0 commit comments

Comments
 (0)