Skip to content

Commit 58bf737

Browse files
authored
Add to templates support operationId as links (#38)
1 parent 3ded4cb commit 58bf737

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

openapidocs/mk/v3/views_markdown/partial/path-items.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
{%- for http_method, operation in definition.items() %}
77

88
### {{http_method.upper()}} {{path | safe}}
9+
{%- if "operationId" in operation -%}
10+
<a id='{{operation.operationId}}'></a>
11+
{%- endif -%}
912
{% if "summary" in operation -%}
1013
{{operation.summary | wordwrap(80)}}
1114
{%- endif -%}

openapidocs/mk/v3/views_mkdocs/partial/path-items.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
<hr class="operation-separator" />
77

88
### <span class="http-{{http_method.lower()}}">{{http_method.upper()}}</span> {{path | route | safe}}
9+
{%- if "operationId" in operation -%}
10+
<a id='{{operation.operationId}}'></a>
11+
{%- endif -%}
912
{% if "summary" in operation -%}
1013
{{operation.summary | wordwrap(80)}}
1114
{%- endif -%}

0 commit comments

Comments
 (0)