Skip to content

Commit

Permalink
Add to templates support operationId as links (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anatoliy057 authored Nov 20, 2023
1 parent 3ded4cb commit 58bf737
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions openapidocs/mk/v3/views_markdown/partial/path-items.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
{%- for http_method, operation in definition.items() %}

### {{http_method.upper()}} {{path | safe}}
{%- if "operationId" in operation -%}
<a id='{{operation.operationId}}'></a>
{%- endif -%}
{% if "summary" in operation -%}
{{operation.summary | wordwrap(80)}}
{%- endif -%}
Expand Down
3 changes: 3 additions & 0 deletions openapidocs/mk/v3/views_mkdocs/partial/path-items.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<hr class="operation-separator" />

### <span class="http-{{http_method.lower()}}">{{http_method.upper()}}</span> {{path | route | safe}}
{%- if "operationId" in operation -%}
<a id='{{operation.operationId}}'></a>
{%- endif -%}
{% if "summary" in operation -%}
{{operation.summary | wordwrap(80)}}
{%- endif -%}
Expand Down

0 comments on commit 58bf737

Please sign in to comment.