Skip to content

Commit

Permalink
[sdk generation pipeline] fix logic to extract swagger file (#38334)
Browse files Browse the repository at this point in the history
* fix logic to extract swagger file

* fix logic to extract swagger file
  • Loading branch information
msyyc authored Nov 5, 2024
1 parent 5136a43 commit 7f5d358
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/azure-sdk-tools/packaging_tools/sdk_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7f5d358

Please sign in to comment.