Skip to content

Commit 4c7aa58

Browse files
committed
docs: add OpenAPI example
1 parent f3cb6a5 commit 4c7aa58

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

docs/content/api/_index.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
type: openapi
3+
title: API documentation
4+
swagger:
5+
url: https://raw.githubusercontent.com/OAI/learn.openapis.org/refs/heads/main/examples/v3.1/tictactoe.json
6+
7+
# Could be multiple URLs (need StandaloneLayout)
8+
#layout: StandaloneLayout
9+
#urls:
10+
#- name: Tic Tac Toe
11+
# url: https://raw.githubusercontent.com/OAI/learn.openapis.org/refs/heads/main/examples/v3.1/tictactoe.json
12+
#- name: Webhook
13+
# url: https://raw.githubusercontent.com/OAI/learn.openapis.org/refs/heads/main/examples/v3.1/webhook-example.json
14+
15+
filter: true
16+
operationsSorter: alpha
17+
tagsSorter: alpha
18+
#tryItOutEnabled: false
19+
#supportedSubmitMethods:
20+
# - get
21+
# More parameters: https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/
22+
---

docs/hugo.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,27 +85,31 @@ menu:
8585
- identifier: versions
8686
name: Versions
8787
weight: 2
88+
- identifier: api
89+
name: API
90+
pageRef: /api
91+
weight: 3
8892
- identifier: blog
8993
name: Blog
9094
pageRef: /blog
91-
weight: 3
95+
weight: 4
9296
- identifier: about
9397
name: About
9498
pageRef: /about
95-
weight: 4
99+
weight: 5
96100
- identifier: showcase
97101
name: Showcase
98102
pageRef: /showcase
99-
weight: 5
103+
weight: 6
100104
params:
101105
type: link
102106
icon: collection
103107
- name: Search
104-
weight: 6
108+
weight: 7
105109
params:
106110
type: search
107111
- name: GitHub
108-
weight: 7
112+
weight: 8
109113
url: "https://github.com/imfing/hextra"
110114
params:
111115
icon: github

0 commit comments

Comments
 (0)