Skip to content

Commit

Permalink
chore: fix api docs path in hint
Browse files Browse the repository at this point in the history
  • Loading branch information
tinygrasshopper committed Jun 20, 2024
1 parent fe752c6 commit a5ea696
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tools/api-docs-generator/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ fetcher:
specs:
- path: docs/.gitbook/assets/v1-api-spec.yaml
suffix: " (v1)"
docsHint: This document uses the v1 API. For more details, see the [v1 API](../v1-api-overview/).
docsHint: This document uses the v1 API. For more details, see the [v1 API](../v1-api.md).
- path: docs/.gitbook/assets/rest-spec.json
docsHint: This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page.
docsHint: This document uses the REST API. For more details, see the [Authentication for API](../rest-api/authentication-for-api/) page.
categoryContext:
- name: licenses-v1
hint: |
Expand Down
6 changes: 4 additions & 2 deletions tools/api-docs-generator/generator/reference_docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ func renderReferenceDocsPage(filePath, label, docsPath string, operation []opera
{%% hint style="info" %%}
%s
{%% endhint %%}`, label, operation[0].docsHint)
{%% endhint %%}
`, label, operation[0].docsHint)
if err != nil {
return err
}
Expand All @@ -176,12 +177,13 @@ func renderReferenceDocsPage(filePath, label, docsPath string, operation []opera
_, err = fmt.Fprintf(docsFile,
`
{%% swagger src="%s" path="%s" method="%s" %%}
[spec.yaml](%s)
[%s](%s)
{%% endswagger %%}
`,
relativePathToSpec,
op.pathURL,
strings.ToLower(op.method),
path.Base(relativePathToSpec),
relativePathToSpec,
)
if err != nil {
Expand Down

0 comments on commit a5ea696

Please sign in to comment.