@heyo-sh/create-heyo-docs 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/astro/content/api-overview.mdx +20 -0
- package/templates/astro/content/assets/local-architecture.svg +22 -0
- package/templates/astro/content/assets/quick-reference.txt +5 -0
- package/templates/astro/content/changelog.mdx +38 -0
- package/templates/astro/content/configuration.mdx +34 -0
- package/templates/astro/content/essentials/callouts.mdx +16 -18
- package/templates/astro/content/essentials/code-blocks.mdx +7 -15
- package/templates/astro/content/essentials/lists.mdx +9 -13
- package/templates/astro/content/essentials/tables.mdx +7 -14
- package/templates/astro/content/essentials/tabs.mdx +10 -12
- package/templates/astro/content/essentials/text-styling.mdx +14 -21
- package/templates/astro/content/openapi-petstore.json +160 -0
- package/templates/astro/content/openapi.json +278 -0
- package/templates/astro/heyo-docs.config.ts +20 -10
- package/templates/astro/src/components/docs-app.tsx +1 -1
- package/templates/astro/src/layouts/docs-layout.astro +1 -0
- package/templates/astro/src/pages/heyo-docs-internal/ai-chat.ts +20 -0
- package/templates/astro/src/pages/index.astro +13 -0
- package/templates/astro/src/styles/app.css +12 -2
- package/templates/astro/src/virtual.d.ts +7 -0
- package/templates/next/app/[[...slug]]/page.tsx +26 -5
- package/templates/next/app/app.css +12 -2
- package/templates/next/app/components/docs-app.tsx +1 -2
- package/templates/next/app/heyo-docs-internal/ai-chat/route.ts +15 -0
- package/templates/next/app/layout.tsx +1 -0
- package/templates/next/content/api-overview.mdx +20 -0
- package/templates/next/content/assets/local-architecture.svg +22 -0
- package/templates/next/content/assets/quick-reference.txt +5 -0
- package/templates/next/content/changelog.mdx +38 -0
- package/templates/next/content/configuration.mdx +34 -0
- package/templates/next/content/essentials/callouts.mdx +16 -18
- package/templates/next/content/essentials/code-blocks.mdx +7 -15
- package/templates/next/content/essentials/lists.mdx +9 -13
- package/templates/next/content/essentials/tables.mdx +7 -14
- package/templates/next/content/essentials/tabs.mdx +10 -12
- package/templates/next/content/essentials/text-styling.mdx +14 -21
- package/templates/next/content/openapi-petstore.json +160 -0
- package/templates/next/content/openapi.json +278 -0
- package/templates/next/heyo-docs.config.ts +20 -10
- package/templates/react-router/app/app.css +12 -2
- package/templates/react-router/app/root.tsx +2 -1
- package/templates/react-router/app/routes/ai-chat.ts +21 -0
- package/templates/react-router/app/routes/docs.tsx +1 -1
- package/templates/react-router/app/routes/home.tsx +20 -1
- package/templates/react-router/app/routes.ts +1 -0
- package/templates/react-router/app/virtual.d.ts +7 -0
- package/templates/react-router/content/api-overview.mdx +20 -0
- package/templates/react-router/content/assets/local-architecture.svg +22 -0
- package/templates/react-router/content/assets/quick-reference.txt +5 -0
- package/templates/react-router/content/changelog.mdx +38 -0
- package/templates/react-router/content/configuration.mdx +34 -0
- package/templates/react-router/content/essentials/callouts.mdx +16 -18
- package/templates/react-router/content/essentials/code-blocks.mdx +7 -15
- package/templates/react-router/content/essentials/lists.mdx +9 -13
- package/templates/react-router/content/essentials/tables.mdx +7 -14
- package/templates/react-router/content/essentials/tabs.mdx +10 -12
- package/templates/react-router/content/essentials/text-styling.mdx +14 -21
- package/templates/react-router/content/openapi-petstore.json +160 -0
- package/templates/react-router/content/openapi.json +278 -0
- package/templates/react-router/heyo-docs.config.ts +20 -10
- package/templates/astro/content/index.mdx +0 -22
- package/templates/next/content/index.mdx +0 -22
- package/templates/react-router/content/index.mdx +0 -22
|
@@ -1,40 +1,36 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Lists
|
|
3
|
-
description: Use
|
|
3
|
+
description: Use lists to make choices and short steps easy to scan.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Lists
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
short sequence, or check completion. Keep every item parallel in structure and
|
|
10
|
-
start it with the action or noun that matters most.
|
|
8
|
+
Use a list when readers need to scan choices or follow a short sequence.
|
|
11
9
|
|
|
12
|
-
##
|
|
10
|
+
## Add a bullet list
|
|
13
11
|
|
|
14
|
-
Use
|
|
12
|
+
Use bullets when the order does not matter.
|
|
15
13
|
|
|
16
14
|
- Keep MDX pages in the `content` directory.
|
|
17
15
|
- Add important routes to `heyo-docs.config.ts`.
|
|
18
16
|
- Build the project before publishing.
|
|
19
17
|
|
|
20
|
-
##
|
|
18
|
+
## Add numbered steps
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
Use numbers when the order matters.
|
|
23
21
|
|
|
24
22
|
1. Create an MDX file.
|
|
25
23
|
2. Add its path to a sidebar section.
|
|
26
24
|
3. Start the development server.
|
|
27
25
|
4. Review the rendered route.
|
|
28
26
|
|
|
29
|
-
##
|
|
27
|
+
## Add one level when needed
|
|
30
28
|
|
|
31
|
-
Use a nested list only
|
|
32
|
-
the page harder to scan than a short heading and paragraph.
|
|
29
|
+
Use a nested list only for a direct relationship.
|
|
33
30
|
|
|
34
31
|
- Prepare the release:
|
|
35
32
|
- Review the changed pages.
|
|
36
33
|
- Confirm navigation order.
|
|
37
34
|
- Run the production build.
|
|
38
35
|
|
|
39
|
-
Use
|
|
40
|
-
command, callout, or additional explanation.
|
|
36
|
+
Use `Steps` when each step needs a command or more explanation.
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Tables
|
|
3
|
-
description: Compare a small
|
|
3
|
+
description: Compare a small set of options with a simple Markdown table.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Tables
|
|
7
7
|
|
|
8
|
-
Use a table
|
|
9
|
-
number of options. Tables are strongest when every cell is short and each row
|
|
10
|
-
can be understood without a paragraph of surrounding prose.
|
|
8
|
+
Use a table to compare the same details across a small number of options.
|
|
11
9
|
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
For example, a configuration reference can show the setting, its purpose, and
|
|
15
|
-
a representative value.
|
|
10
|
+
## Add a table
|
|
16
11
|
|
|
17
12
|
| Setting | Purpose | Example |
|
|
18
13
|
| --------- | -------------------------------------- | ---------------------------- |
|
|
@@ -21,11 +16,10 @@ a representative value.
|
|
|
21
16
|
| `mode` | Initial color preference. | `"system"` |
|
|
22
17
|
| `siteUrl` | Canonical public site origin. | `"https://docs.example.com"` |
|
|
23
18
|
|
|
24
|
-
## Keep
|
|
19
|
+
## Keep it readable
|
|
25
20
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
read horizontally.
|
|
21
|
+
Use short headings and short cells. Put long explanations in a section below
|
|
22
|
+
the table.
|
|
29
23
|
|
|
30
24
|
| Use a table for | Use a section for |
|
|
31
25
|
| ---------------------- | ---------------------- |
|
|
@@ -33,5 +27,4 @@ read horizontally.
|
|
|
33
27
|
| Option defaults | A detailed explanation |
|
|
34
28
|
| Short reference values | A large code example |
|
|
35
29
|
|
|
36
|
-
|
|
37
|
-
list or [Quickstart](/quickstart) instead.
|
|
30
|
+
Use a numbered list when readers must act in a specific order.
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Tabs
|
|
3
|
-
description: Let readers
|
|
3
|
+
description: Let readers switch between equivalent commands or platforms.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Tabs
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
only one option to complete the task.
|
|
8
|
+
Use tabs for equivalent ways to complete the same task. Keep their labels
|
|
9
|
+
short.
|
|
11
10
|
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
Each `Tab` needs a concise title. Give a tab a stable `value` when you need
|
|
15
|
-
to set a different initial panel with `defaultValue`.
|
|
11
|
+
## Add tabs
|
|
16
12
|
|
|
17
13
|
<Tabs defaultValue="typescript" variant="line">
|
|
18
14
|
<Tab title="JavaScript" value="javascript">
|
|
@@ -23,11 +19,9 @@ to set a different initial panel with `defaultValue`.
|
|
|
23
19
|
</Tab>
|
|
24
20
|
</Tabs>
|
|
25
21
|
|
|
26
|
-
##
|
|
22
|
+
## Compare platforms
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
Use headings or `Steps` for a sequence that every reader must complete; tabs
|
|
30
|
-
can hide required information.
|
|
24
|
+
Each tab should answer the same question for a different platform.
|
|
31
25
|
|
|
32
26
|
<Tabs defaultValue="vercel" variant="line">
|
|
33
27
|
<Tab title="Vercel" value="vercel">
|
|
@@ -40,3 +34,7 @@ can hide required information.
|
|
|
40
34
|
Upload the build output to any host that serves static files.
|
|
41
35
|
</Tab>
|
|
42
36
|
</Tabs>
|
|
37
|
+
|
|
38
|
+
<Callout type="tip" title="Use tabs sparingly">
|
|
39
|
+
Use headings or <code>Steps</code> for information that every reader needs.
|
|
40
|
+
</Callout>
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Text Styling
|
|
3
|
-
description:
|
|
3
|
+
description: Use simple Markdown for headings, emphasis, links, and quotes.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Text Styling
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
descriptive H2 and H3 headings.
|
|
8
|
+
Use regular Markdown for most documentation. Keep the text short and let
|
|
9
|
+
headings show readers where to look next.
|
|
11
10
|
|
|
12
|
-
##
|
|
11
|
+
## Add headings
|
|
13
12
|
|
|
14
|
-
Use `##` for
|
|
15
|
-
has a meaningful subdivision. Headings should tell the reader what they will
|
|
16
|
-
learn, not simply announce that more information follows.
|
|
13
|
+
Use `##` for a main section and `###` only for a useful subsection.
|
|
17
14
|
|
|
18
15
|
```md
|
|
19
16
|
## Configure navigation
|
|
@@ -22,29 +19,25 @@ Add pages in the order readers should follow.
|
|
|
22
19
|
|
|
23
20
|
### Add an external resource
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
Link to a resource outside your documentation.
|
|
26
23
|
```
|
|
27
24
|
|
|
28
|
-
##
|
|
25
|
+
## Highlight important text
|
|
29
26
|
|
|
30
|
-
Use **bold
|
|
31
|
-
|
|
32
|
-
sentence plain so these signals remain useful.
|
|
27
|
+
Use **bold** for an important choice and inline `code` for values readers need
|
|
28
|
+
to copy.
|
|
33
29
|
|
|
34
30
|
```md
|
|
35
31
|
Set `content: "content"` in `heyo-docs.config.ts`.
|
|
36
32
|
|
|
37
|
-
|
|
33
|
+
Run `bun run build` before you publish.
|
|
38
34
|
```
|
|
39
35
|
|
|
40
|
-
##
|
|
36
|
+
## Write useful links
|
|
41
37
|
|
|
42
|
-
|
|
43
|
-
well for another page in the same documentation, while full URLs are useful for
|
|
44
|
-
external resources.
|
|
38
|
+
Use the destination as the link text. It is easier to scan than a raw URL.
|
|
45
39
|
|
|
46
|
-
Read the [Quickstart](/quickstart) before changing
|
|
40
|
+
Read the [Quickstart](/quickstart) before changing
|
|
47
41
|
[site configuration](/configuration).
|
|
48
42
|
|
|
49
|
-
> Keep
|
|
50
|
-
> decision that applies to them.
|
|
43
|
+
> Keep one idea in each short paragraph.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.4",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Swagger Petstore - OpenAPI 3.0",
|
|
5
|
+
"description": "A small, read-only extract of the public Swagger Petstore schema for debugging Heyo Docs. Source: https://petstore3.swagger.io/api/v3/openapi.json",
|
|
6
|
+
"version": "1.0.27",
|
|
7
|
+
"license": {
|
|
8
|
+
"name": "Apache 2.0",
|
|
9
|
+
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"servers": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://petstore3.swagger.io/api/v3",
|
|
15
|
+
"description": "Swagger Petstore public server"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"paths": {
|
|
19
|
+
"/pet/findByStatus": {
|
|
20
|
+
"get": {
|
|
21
|
+
"tags": ["pet"],
|
|
22
|
+
"summary": "Finds Pets by status.",
|
|
23
|
+
"description": "Multiple status values can be provided with comma separated strings.",
|
|
24
|
+
"operationId": "findPetsByStatus",
|
|
25
|
+
"parameters": [
|
|
26
|
+
{
|
|
27
|
+
"name": "status",
|
|
28
|
+
"in": "query",
|
|
29
|
+
"description": "Status values that need to be considered for filter",
|
|
30
|
+
"required": true,
|
|
31
|
+
"explode": true,
|
|
32
|
+
"schema": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"default": "available",
|
|
35
|
+
"enum": ["available", "pending", "sold"]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"responses": {
|
|
40
|
+
"200": {
|
|
41
|
+
"description": "successful operation",
|
|
42
|
+
"content": {
|
|
43
|
+
"application/json": {
|
|
44
|
+
"schema": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": { "$ref": "#/components/schemas/Pet" }
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"400": {
|
|
52
|
+
"description": "Invalid status value"
|
|
53
|
+
},
|
|
54
|
+
"default": {
|
|
55
|
+
"description": "Unexpected error"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"/store/order/{orderId}": {
|
|
61
|
+
"get": {
|
|
62
|
+
"tags": ["store"],
|
|
63
|
+
"summary": "Find purchase order by ID.",
|
|
64
|
+
"description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.",
|
|
65
|
+
"operationId": "getOrderById",
|
|
66
|
+
"parameters": [
|
|
67
|
+
{
|
|
68
|
+
"name": "orderId",
|
|
69
|
+
"in": "path",
|
|
70
|
+
"description": "ID of order that needs to be fetched.",
|
|
71
|
+
"required": true,
|
|
72
|
+
"schema": {
|
|
73
|
+
"type": "integer",
|
|
74
|
+
"format": "int64"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"responses": {
|
|
79
|
+
"200": {
|
|
80
|
+
"description": "successful operation",
|
|
81
|
+
"content": {
|
|
82
|
+
"application/json": {
|
|
83
|
+
"schema": { "$ref": "#/components/schemas/Order" }
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"400": {
|
|
88
|
+
"description": "Invalid ID supplied"
|
|
89
|
+
},
|
|
90
|
+
"404": {
|
|
91
|
+
"description": "Order not found"
|
|
92
|
+
},
|
|
93
|
+
"default": {
|
|
94
|
+
"description": "Unexpected error"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"components": {
|
|
101
|
+
"schemas": {
|
|
102
|
+
"Order": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"properties": {
|
|
105
|
+
"id": { "type": "integer", "format": "int64", "example": 10 },
|
|
106
|
+
"petId": {
|
|
107
|
+
"type": "integer",
|
|
108
|
+
"format": "int64",
|
|
109
|
+
"example": 198772
|
|
110
|
+
},
|
|
111
|
+
"quantity": { "type": "integer", "format": "int32", "example": 7 },
|
|
112
|
+
"shipDate": { "type": "string", "format": "date-time" },
|
|
113
|
+
"status": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"description": "Order Status",
|
|
116
|
+
"example": "approved",
|
|
117
|
+
"enum": ["placed", "approved", "delivered"]
|
|
118
|
+
},
|
|
119
|
+
"complete": { "type": "boolean" }
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"Category": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"properties": {
|
|
125
|
+
"id": { "type": "integer", "format": "int64", "example": 1 },
|
|
126
|
+
"name": { "type": "string", "example": "Dogs" }
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"Tag": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"properties": {
|
|
132
|
+
"id": { "type": "integer", "format": "int64" },
|
|
133
|
+
"name": { "type": "string" }
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"Pet": {
|
|
137
|
+
"required": ["name", "photoUrls"],
|
|
138
|
+
"type": "object",
|
|
139
|
+
"properties": {
|
|
140
|
+
"id": { "type": "integer", "format": "int64", "example": 10 },
|
|
141
|
+
"name": { "type": "string", "example": "doggie" },
|
|
142
|
+
"category": { "$ref": "#/components/schemas/Category" },
|
|
143
|
+
"photoUrls": {
|
|
144
|
+
"type": "array",
|
|
145
|
+
"items": { "type": "string" }
|
|
146
|
+
},
|
|
147
|
+
"tags": {
|
|
148
|
+
"type": "array",
|
|
149
|
+
"items": { "$ref": "#/components/schemas/Tag" }
|
|
150
|
+
},
|
|
151
|
+
"status": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"description": "pet status in the store",
|
|
154
|
+
"enum": ["available", "pending", "sold"]
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Planet API",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "An example API used by the Heyo Docs React Router demo."
|
|
7
|
+
},
|
|
8
|
+
"servers": [
|
|
9
|
+
{
|
|
10
|
+
"url": "https://api.example.com/v1",
|
|
11
|
+
"description": "Example production API"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"security": [
|
|
15
|
+
{
|
|
16
|
+
"BearerAuth": []
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"/organizations/{organizationId}/planets": {
|
|
21
|
+
"parameters": [
|
|
22
|
+
{
|
|
23
|
+
"name": "organizationId",
|
|
24
|
+
"in": "path",
|
|
25
|
+
"required": true,
|
|
26
|
+
"description": "The organization that owns the planets.",
|
|
27
|
+
"schema": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"example": "org_123"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"get": {
|
|
34
|
+
"operationId": "listPlanets",
|
|
35
|
+
"summary": "List planets",
|
|
36
|
+
"description": "Returns the planets that belong to an organization.",
|
|
37
|
+
"tags": ["Planets"],
|
|
38
|
+
"parameters": [
|
|
39
|
+
{
|
|
40
|
+
"name": "limit",
|
|
41
|
+
"in": "query",
|
|
42
|
+
"description": "Maximum number of records to return.",
|
|
43
|
+
"schema": {
|
|
44
|
+
"type": "integer",
|
|
45
|
+
"default": 20
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"responses": {
|
|
50
|
+
"200": {
|
|
51
|
+
"description": "A page of planets.",
|
|
52
|
+
"content": {
|
|
53
|
+
"application/json": {
|
|
54
|
+
"schema": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": {
|
|
57
|
+
"$ref": "#/components/schemas/Planet"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"post": {
|
|
66
|
+
"operationId": "createPlanet",
|
|
67
|
+
"summary": "Create a planet",
|
|
68
|
+
"description": "Creates a planet inside an organization.",
|
|
69
|
+
"tags": ["Planets"],
|
|
70
|
+
"requestBody": {
|
|
71
|
+
"required": true,
|
|
72
|
+
"description": "The planet to create.",
|
|
73
|
+
"content": {
|
|
74
|
+
"application/json": {
|
|
75
|
+
"schema": {
|
|
76
|
+
"$ref": "#/components/schemas/PlanetInput"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"responses": {
|
|
82
|
+
"201": {
|
|
83
|
+
"description": "The newly created planet.",
|
|
84
|
+
"content": {
|
|
85
|
+
"application/json": {
|
|
86
|
+
"schema": {
|
|
87
|
+
"$ref": "#/components/schemas/Planet"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"/organizations/{organizationId}/planets/{planetId}": {
|
|
96
|
+
"parameters": [
|
|
97
|
+
{
|
|
98
|
+
"name": "organizationId",
|
|
99
|
+
"in": "path",
|
|
100
|
+
"required": true,
|
|
101
|
+
"description": "The organization that owns the planet.",
|
|
102
|
+
"schema": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"example": "org_123"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "planetId",
|
|
109
|
+
"in": "path",
|
|
110
|
+
"required": true,
|
|
111
|
+
"description": "The planet identifier.",
|
|
112
|
+
"schema": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"example": "planet_earth"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"get": {
|
|
119
|
+
"operationId": "getPlanet",
|
|
120
|
+
"summary": "Get a planet",
|
|
121
|
+
"description": "Returns one planet by ID.",
|
|
122
|
+
"tags": ["Planets"],
|
|
123
|
+
"responses": {
|
|
124
|
+
"200": {
|
|
125
|
+
"description": "The requested planet.",
|
|
126
|
+
"content": {
|
|
127
|
+
"application/json": {
|
|
128
|
+
"schema": {
|
|
129
|
+
"$ref": "#/components/schemas/Planet"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"404": {
|
|
135
|
+
"description": "Planet not found."
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"put": {
|
|
140
|
+
"operationId": "replacePlanet",
|
|
141
|
+
"summary": "Replace a planet",
|
|
142
|
+
"description": "Replaces all editable planet values.",
|
|
143
|
+
"tags": ["Planets"],
|
|
144
|
+
"requestBody": {
|
|
145
|
+
"required": true,
|
|
146
|
+
"content": {
|
|
147
|
+
"application/json": {
|
|
148
|
+
"schema": {
|
|
149
|
+
"$ref": "#/components/schemas/PlanetInput"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"responses": {
|
|
155
|
+
"200": {
|
|
156
|
+
"description": "The updated planet.",
|
|
157
|
+
"content": {
|
|
158
|
+
"application/json": {
|
|
159
|
+
"schema": {
|
|
160
|
+
"$ref": "#/components/schemas/Planet"
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"patch": {
|
|
168
|
+
"operationId": "updatePlanet",
|
|
169
|
+
"summary": "Update a planet",
|
|
170
|
+
"description": "Updates one or more planet fields.",
|
|
171
|
+
"tags": ["Planets"],
|
|
172
|
+
"requestBody": {
|
|
173
|
+
"required": true,
|
|
174
|
+
"content": {
|
|
175
|
+
"application/json": {
|
|
176
|
+
"schema": {
|
|
177
|
+
"$ref": "#/components/schemas/PlanetPatch"
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"responses": {
|
|
183
|
+
"200": {
|
|
184
|
+
"description": "The updated planet.",
|
|
185
|
+
"content": {
|
|
186
|
+
"application/json": {
|
|
187
|
+
"schema": {
|
|
188
|
+
"$ref": "#/components/schemas/Planet"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"delete": {
|
|
196
|
+
"operationId": "deletePlanet",
|
|
197
|
+
"summary": "Delete a planet",
|
|
198
|
+
"description": "Permanently removes a planet from an organization.",
|
|
199
|
+
"tags": ["Planets"],
|
|
200
|
+
"parameters": [
|
|
201
|
+
{
|
|
202
|
+
"name": "hardDelete",
|
|
203
|
+
"in": "query",
|
|
204
|
+
"description": "Also remove historical records.",
|
|
205
|
+
"schema": {
|
|
206
|
+
"type": "boolean",
|
|
207
|
+
"default": false
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
"responses": {
|
|
212
|
+
"204": {
|
|
213
|
+
"description": "Planet deleted."
|
|
214
|
+
},
|
|
215
|
+
"404": {
|
|
216
|
+
"description": "Planet not found."
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"components": {
|
|
223
|
+
"securitySchemes": {
|
|
224
|
+
"BearerAuth": {
|
|
225
|
+
"type": "http",
|
|
226
|
+
"scheme": "bearer",
|
|
227
|
+
"bearerFormat": "JWT"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"schemas": {
|
|
231
|
+
"Planet": {
|
|
232
|
+
"type": "object",
|
|
233
|
+
"required": ["id", "name", "classification"],
|
|
234
|
+
"properties": {
|
|
235
|
+
"id": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"example": "planet_earth"
|
|
238
|
+
},
|
|
239
|
+
"name": {
|
|
240
|
+
"type": "string",
|
|
241
|
+
"example": "Earth"
|
|
242
|
+
},
|
|
243
|
+
"classification": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"enum": ["terrestrial", "gas-giant", "ice-giant"]
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"PlanetInput": {
|
|
250
|
+
"type": "object",
|
|
251
|
+
"required": ["name", "classification"],
|
|
252
|
+
"properties": {
|
|
253
|
+
"name": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"example": "Mars"
|
|
256
|
+
},
|
|
257
|
+
"classification": {
|
|
258
|
+
"type": "string",
|
|
259
|
+
"enum": ["terrestrial", "gas-giant", "ice-giant"]
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"PlanetPatch": {
|
|
264
|
+
"type": "object",
|
|
265
|
+
"properties": {
|
|
266
|
+
"name": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"example": "New Mars"
|
|
269
|
+
},
|
|
270
|
+
"classification": {
|
|
271
|
+
"type": "string",
|
|
272
|
+
"enum": ["terrestrial", "gas-giant", "ice-giant"]
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
@@ -11,15 +11,6 @@ export default heyoDocs({
|
|
|
11
11
|
group: "Documentation",
|
|
12
12
|
icon: "globe",
|
|
13
13
|
sections: [
|
|
14
|
-
{
|
|
15
|
-
pages: [
|
|
16
|
-
{
|
|
17
|
-
title: "Documentation",
|
|
18
|
-
src: "https://docs.heyo.sh/introduction",
|
|
19
|
-
icon: "book",
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
},
|
|
23
14
|
{
|
|
24
15
|
section: "Get Started",
|
|
25
16
|
icon: "lightbulb",
|
|
@@ -39,8 +30,27 @@ export default heyoDocs({
|
|
|
39
30
|
},
|
|
40
31
|
],
|
|
41
32
|
},
|
|
33
|
+
{
|
|
34
|
+
group: "OpenAPI",
|
|
35
|
+
icon: "code",
|
|
36
|
+
sections: [
|
|
37
|
+
{
|
|
38
|
+
pages: ["api-overview"],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
schema: "./openapi.json",
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
group: "Changelog",
|
|
47
|
+
description: "Mock release notes for the Heyo Docs demo.",
|
|
48
|
+
icon: "changelog",
|
|
49
|
+
type: "changelog",
|
|
50
|
+
updates: ["changelog"],
|
|
51
|
+
},
|
|
42
52
|
],
|
|
43
|
-
branding: { name: "{{PROJECT_NAME}}" },
|
|
53
|
+
branding: { name: "{{PROJECT_NAME}}", logo: "/logo.svg" },
|
|
44
54
|
// Set this before deploying to publish canonical and absolute social URLs.
|
|
45
55
|
// siteUrl: "https://docs.example.com",
|
|
46
56
|
});
|