Skip to content

Commit

Permalink
add iframe_id
Browse files Browse the repository at this point in the history
  • Loading branch information
blueswen committed Mar 25, 2024
1 parent 92add9c commit 28434d3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mkdocs_swagger_ui_tag/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def render_template(openapi_spec_url, swagger_ui_ele):
with open(os.path.join(page_dir, iframe_filename), "w") as f:
f.write(template_output)
self.replace_with_iframe(soup, swagger_ui_ele, cur_id, iframe_filename)
return cur_id

for swagger_ui_ele in swagger_ui_list:
if swagger_ui_ele.has_attr("grouped"):
Expand All @@ -174,8 +175,10 @@ def render_template(openapi_spec_url, swagger_ui_ele):
openapi_spec_url = self.path_to_url(
page.file, swagger_ui_ele.get("src", "")
)
render_template(
openapi_spec_url=openapi_spec_url, swagger_ui_ele=swagger_ui_ele
iframe_id_list.append(
render_template(
openapi_spec_url=openapi_spec_url, swagger_ui_ele=swagger_ui_ele
)
)

if grouped_list:
Expand Down

0 comments on commit 28434d3

Please sign in to comment.