@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.
Files changed (64) hide show
  1. package/package.json +1 -1
  2. package/templates/astro/content/api-overview.mdx +20 -0
  3. package/templates/astro/content/assets/local-architecture.svg +22 -0
  4. package/templates/astro/content/assets/quick-reference.txt +5 -0
  5. package/templates/astro/content/changelog.mdx +38 -0
  6. package/templates/astro/content/configuration.mdx +34 -0
  7. package/templates/astro/content/essentials/callouts.mdx +16 -18
  8. package/templates/astro/content/essentials/code-blocks.mdx +7 -15
  9. package/templates/astro/content/essentials/lists.mdx +9 -13
  10. package/templates/astro/content/essentials/tables.mdx +7 -14
  11. package/templates/astro/content/essentials/tabs.mdx +10 -12
  12. package/templates/astro/content/essentials/text-styling.mdx +14 -21
  13. package/templates/astro/content/openapi-petstore.json +160 -0
  14. package/templates/astro/content/openapi.json +278 -0
  15. package/templates/astro/heyo-docs.config.ts +20 -10
  16. package/templates/astro/src/components/docs-app.tsx +1 -1
  17. package/templates/astro/src/layouts/docs-layout.astro +1 -0
  18. package/templates/astro/src/pages/heyo-docs-internal/ai-chat.ts +20 -0
  19. package/templates/astro/src/pages/index.astro +13 -0
  20. package/templates/astro/src/styles/app.css +12 -2
  21. package/templates/astro/src/virtual.d.ts +7 -0
  22. package/templates/next/app/[[...slug]]/page.tsx +26 -5
  23. package/templates/next/app/app.css +12 -2
  24. package/templates/next/app/components/docs-app.tsx +1 -2
  25. package/templates/next/app/heyo-docs-internal/ai-chat/route.ts +15 -0
  26. package/templates/next/app/layout.tsx +1 -0
  27. package/templates/next/content/api-overview.mdx +20 -0
  28. package/templates/next/content/assets/local-architecture.svg +22 -0
  29. package/templates/next/content/assets/quick-reference.txt +5 -0
  30. package/templates/next/content/changelog.mdx +38 -0
  31. package/templates/next/content/configuration.mdx +34 -0
  32. package/templates/next/content/essentials/callouts.mdx +16 -18
  33. package/templates/next/content/essentials/code-blocks.mdx +7 -15
  34. package/templates/next/content/essentials/lists.mdx +9 -13
  35. package/templates/next/content/essentials/tables.mdx +7 -14
  36. package/templates/next/content/essentials/tabs.mdx +10 -12
  37. package/templates/next/content/essentials/text-styling.mdx +14 -21
  38. package/templates/next/content/openapi-petstore.json +160 -0
  39. package/templates/next/content/openapi.json +278 -0
  40. package/templates/next/heyo-docs.config.ts +20 -10
  41. package/templates/react-router/app/app.css +12 -2
  42. package/templates/react-router/app/root.tsx +2 -1
  43. package/templates/react-router/app/routes/ai-chat.ts +21 -0
  44. package/templates/react-router/app/routes/docs.tsx +1 -1
  45. package/templates/react-router/app/routes/home.tsx +20 -1
  46. package/templates/react-router/app/routes.ts +1 -0
  47. package/templates/react-router/app/virtual.d.ts +7 -0
  48. package/templates/react-router/content/api-overview.mdx +20 -0
  49. package/templates/react-router/content/assets/local-architecture.svg +22 -0
  50. package/templates/react-router/content/assets/quick-reference.txt +5 -0
  51. package/templates/react-router/content/changelog.mdx +38 -0
  52. package/templates/react-router/content/configuration.mdx +34 -0
  53. package/templates/react-router/content/essentials/callouts.mdx +16 -18
  54. package/templates/react-router/content/essentials/code-blocks.mdx +7 -15
  55. package/templates/react-router/content/essentials/lists.mdx +9 -13
  56. package/templates/react-router/content/essentials/tables.mdx +7 -14
  57. package/templates/react-router/content/essentials/tabs.mdx +10 -12
  58. package/templates/react-router/content/essentials/text-styling.mdx +14 -21
  59. package/templates/react-router/content/openapi-petstore.json +160 -0
  60. package/templates/react-router/content/openapi.json +278 -0
  61. package/templates/react-router/heyo-docs.config.ts +20 -10
  62. package/templates/astro/content/index.mdx +0 -22
  63. package/templates/next/content/index.mdx +0 -22
  64. package/templates/react-router/content/index.mdx +0 -22
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyo-sh/create-heyo-docs",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Create a standalone Heyo Docs documentation project.",
5
5
  "homepage": "https://heyo.sh",
6
6
  "repository": {
@@ -0,0 +1,20 @@
1
+ ---
2
+ title: API overview
3
+ description: Learn how to authenticate and explore the API reference.
4
+ ---
5
+
6
+ # API overview
7
+
8
+ The API reference is generated from `openapi.json`. Use the endpoint pages to
9
+ enter parameters, send a request, and copy a cURL or JavaScript example.
10
+
11
+ ## Authentication
12
+
13
+ The example API uses a Bearer token. Enter it once on any protected endpoint;
14
+ Heyo Docs keeps it in this browser while you move between API pages.
15
+
16
+ ## Custom pages first
17
+
18
+ This ordinary MDX page belongs to the OpenAPI group. Its section is configured
19
+ before the generated endpoint sections, so it always appears at the top of the
20
+ sidebar.
@@ -0,0 +1,22 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="960" height="360" viewBox="0 0 960 360" fill="none">
2
+ <rect width="960" height="360" rx="24" fill="#F7F7F8"/>
3
+ <g fill="#FFFFFF" stroke="#D4D4D8" stroke-width="2">
4
+ <rect x="72" y="108" width="220" height="144" rx="18"/>
5
+ <rect x="370" y="108" width="220" height="144" rx="18"/>
6
+ <rect x="668" y="108" width="220" height="144" rx="18"/>
7
+ </g>
8
+ <g fill="#18181B" font-family="Arial, sans-serif" text-anchor="middle">
9
+ <text x="182" y="166" font-size="17" font-weight="700">Content</text>
10
+ <text x="182" y="194" font-size="14" fill="#71717A">MDX and assets</text>
11
+ <text x="480" y="166" font-size="17" font-weight="700">Build</text>
12
+ <text x="480" y="194" font-size="14" fill="#71717A">Vite bundles files</text>
13
+ <text x="778" y="166" font-size="17" font-weight="700">Documentation</text>
14
+ <text x="778" y="194" font-size="14" fill="#71717A">Static output</text>
15
+ </g>
16
+ <g stroke="#71717A" stroke-linecap="round" stroke-width="2">
17
+ <path d="M314 180h34"/>
18
+ <path d="m340 172 8 8-8 8"/>
19
+ <path d="M612 180h34"/>
20
+ <path d="m638 172 8 8-8 8"/>
21
+ </g>
22
+ </svg>
@@ -0,0 +1,5 @@
1
+ Heyo Docs quick reference
2
+
3
+ - Put MDX pages and local assets in content.
4
+ - Use a relative path to bundle an image or downloadable file.
5
+ - Use /path for assets in public.
@@ -0,0 +1,38 @@
1
+ ---
2
+ title: Changelog
3
+ description: Mock release notes for the Heyo Docs example.
4
+ ---
5
+
6
+ # Changelog
7
+
8
+ <Update label="April 2026" tags={["New", "Documentation"]}>
9
+
10
+ ## Starter documentation
11
+
12
+ New projects and runnable examples now include a structured Quickstart, basic
13
+ configuration guide, deployment overview, and essential writing patterns.
14
+
15
+ ## Square API group
16
+
17
+ The example navigation now keeps the pinned Square OpenAPI schema in its own
18
+ group, making large-schema behaviour easy to inspect.
19
+
20
+ </Update>
21
+
22
+ <Update label="March 2026" tags={["Improved", "Developer experience"]}>
23
+
24
+ ## Clearer navigation
25
+
26
+ External documentation links can display an icon, and sidebar groups now keep
27
+ onboarding, API reference, and release notes separate.
28
+
29
+ </Update>
30
+
31
+ <Update label="February 2026" tags={["Fixed"]}>
32
+
33
+ ## More predictable previews
34
+
35
+ Preview builds now validate configured routes before mock release notes are
36
+ published.
37
+
38
+ </Update>
@@ -64,6 +64,40 @@ The order is meaningful: it controls the sidebar and the previous/next links at
64
64
  the end of each article. Use a page object with `title` and `src` when a
65
65
  sidebar entry should point to a page outside the local documentation.
66
66
 
67
+ ## AI chat
68
+
69
+ Add `ai.chat` to enable a documentation-aware chat. `openai`, `claude`, and `grok`
70
+ use the OpenAI, Anthropic, and xAI adapters respectively. Keep the key in a
71
+ server environment variable; Heyo Docs sends it only from the chat endpoint.
72
+
73
+ <CodeBlock language="ts" title="heyo-docs.config.ts">
74
+ {`ai: {
75
+ chat: {
76
+ provider: "openai",
77
+ key: process.env.OPENAI_API_KEY!,
78
+ model: "gpt-5-mini",
79
+ variant: "right", // "center" shows the compact prompt first
80
+ icon: "chat",
81
+ text: "AI Chat",
82
+ name: "Docs Assistant", // name shown in the drawer and message labels
83
+ placeholder: "Ask AI about the docs", // used in the compact prompt and drawer
84
+ },
85
+ },`}
86
+ </CodeBlock>
87
+
88
+ `provider`, `key`, and `model` are required. The model must be an actual model
89
+ identifier, not the provider name. `variant` defaults to `right`. `name`
90
+ defaults to `AI`; it is used for the drawer title and the assistant's message
91
+ label. `placeholder` defaults to
92
+ `Ask AI about the docs` and is shared by the compact prompt and drawer input.
93
+ The drawer stays open while
94
+ readers navigate between documentation pages and does not block the rest of the
95
+ page.
96
+
97
+ Its chrome follows the selected documentation theme. For example, `grain` uses
98
+ a full-height right panel with a left border, while the other themes keep a
99
+ floating panel treatment.
100
+
67
101
  ## Verify the result
68
102
 
69
103
  Run the project's typecheck and build commands after changing configuration.
@@ -1,36 +1,34 @@
1
1
  ---
2
2
  title: Callouts
3
- description: Highlight prerequisites, tips, warnings, and successful outcomes.
3
+ description: Draw attention to a tip, warning, prerequisite, or result.
4
4
  ---
5
5
 
6
6
  # Callouts
7
7
 
8
- Use `Callout` when an important note should stand apart from the surrounding
9
- prose. It works well for a prerequisite, a preferred approach, a warning, or a
10
- successful result.
8
+ Use a callout when a reader should not miss a detail.
11
9
 
12
- ## Choose the right emphasis
13
-
14
- Use `note` or `info` for context, `tip` for a recommended approach, and
15
- `check` for a completed outcome. Reserve `warning` and `danger` for cases
16
- where missing the message has a real consequence.
10
+ ## Add a tip
17
11
 
18
12
  <Callout type="tip" title="Keep examples focused">
19
13
  Show one idea at a time so readers can apply it quickly.
20
14
  </Callout>
21
15
 
16
+ ## Choose a type
17
+
18
+ | Type | Use it for |
19
+ | --------------------- | ---------------------- |
20
+ | `info` or `note` | Helpful context |
21
+ | `tip` | A recommended approach |
22
+ | `check` | A successful result |
23
+ | `warning` or `danger` | A real consequence |
24
+
22
25
  <Callout type="warning" title="Preview before publishing">
23
- Run the production build locally after changing navigation or MDX.
26
+ Run the production build after changing navigation or MDX.
24
27
  </Callout>
25
28
 
26
- ## Add richer guidance
27
-
28
- Pass the message as children when it needs Markdown or another MDX component.
29
+ ## Keep it short
29
30
 
30
31
  <Callout type="info" title="Configuration and content work together">
31
- Navigation belongs in <code>heyo-docs.config.ts</code>; page titles and
32
- descriptions belong in the page frontmatter.
32
+ Navigation belongs in <code>heyo-docs.config.ts</code>. Titles and
33
+ descriptions belong in page frontmatter.
33
34
  </Callout>
34
-
35
- Keep each callout focused on one decision. A long sequence of status messages is
36
- usually clearer as regular sections or a numbered procedure.
@@ -1,29 +1,22 @@
1
1
  ---
2
2
  title: Code Blocks
3
- description: Write compact, copyable examples with syntax highlighting and context.
3
+ description: Add clear, copyable commands and configuration examples.
4
4
  ---
5
5
 
6
6
  # Code Blocks
7
7
 
8
- A code example should answer one implementation question and be safe to copy.
9
- Use inline code for a literal value, then use a fenced block or `CodeBlock`
10
- when a reader needs more than one line.
8
+ Show one task per example. Add a language so the code is easy to read.
11
9
 
12
- ## Add a language to fenced code
13
-
14
- The language label enables syntax highlighting and tells readers what they are
15
- looking at. Use `bash` for commands, `ts` for configuration, and `json` for
16
- data.
10
+ ## Add a command
17
11
 
18
12
  ```bash
19
13
  bun run dev
20
14
  bun run build
21
15
  ```
22
16
 
23
- ## Give configuration a title
17
+ ## Add a file name
24
18
 
25
- Use `CodeBlock` when a sample needs a filename or line numbers. Keep examples
26
- small enough that a reader can understand their effect before copying them.
19
+ Use `CodeBlock` when the file name helps explain where the code belongs.
27
20
 
28
21
  <CodeBlock language="ts" title="heyo-docs.config.ts" showLineNumbers>
29
22
  {`export default heyoDocs({
@@ -33,10 +26,9 @@ small enough that a reader can understand their effect before copying them.
33
26
  });`}
34
27
  </CodeBlock>
35
28
 
36
- ## Compare equivalent commands
29
+ ## Show alternatives
37
30
 
38
- Put package-manager variants in a `CodeBlockGroup` so readers can choose one
39
- command without scrolling past unrelated options.
31
+ Use `CodeBlockGroup` for equivalent commands, such as package managers.
40
32
 
41
33
  <CodeBlockGroup defaultValue="bun" variant="line">
42
34
  <CodeBlock language="bash" title="bun">
@@ -1,40 +1,36 @@
1
1
  ---
2
2
  title: Lists
3
- description: Use ordered, unordered, and task lists to make steps and choices easy to scan.
3
+ description: Use lists to make choices and short steps easy to scan.
4
4
  ---
5
5
 
6
6
  # Lists
7
7
 
8
- Lists make a page easier to scan when readers need to compare options, follow a
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
- ## Use bullets for related options
10
+ ## Add a bullet list
13
11
 
14
- Use an unordered list when order does not change the result.
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
- ## Use numbers when sequence matters
18
+ ## Add numbered steps
21
19
 
22
- An ordered list makes dependencies explicit.
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
- ## Keep nested lists intentional
27
+ ## Add one level when needed
30
28
 
31
- Use a nested list only to clarify a direct relationship. Too many levels make
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 a `Steps` component instead when each item needs rich content such as a
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, consistent set of options in a documentation table.
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 when readers need to compare the same attributes across a small
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
- ## Compare like with like
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 cells concise
19
+ ## Keep it readable
25
20
 
26
- Move long explanations, procedures, and code samples out of the table. Link to
27
- a focused guide instead of stretching a table past the point where it can be
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
- If a reader must act on the information in a specific order, use a numbered
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 choose between related commands or platform-specific instructions.
3
+ description: Let readers switch between equivalent commands or platforms.
4
4
  ---
5
5
 
6
6
  # Tabs
7
7
 
8
- `Tabs` presents related content one panel at a time. It is useful for package
9
- manager commands, framework variants, and small comparisons where readers need
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
- ## Label equivalent choices clearly
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
- ## Keep the choices parallel
22
+ ## Compare platforms
27
23
 
28
- Tabs work when every panel solves the same problem in a different environment.
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: Structure documentation with clear headings, emphasis, links, and quotes.
3
+ description: Use simple Markdown for headings, emphasis, links, and quotes.
4
4
  ---
5
5
 
6
6
  # Text Styling
7
7
 
8
- Good documentation is easy to scan before it is read in detail. Use the
9
- frontmatter title for the page's H1, then organize the body around short,
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
- ## Build a clear hierarchy
11
+ ## Add headings
13
12
 
14
- Use `##` for the main tasks or ideas on a page. Add `###` only when a section
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
- Use a custom link for a separate destination.
22
+ Link to a resource outside your documentation.
26
23
  ```
27
24
 
28
- ## Emphasize the decision
25
+ ## Highlight important text
29
26
 
30
- Use **bold text** for an important choice and inline `code` for literal values
31
- such as file names, commands, and configuration keys. Keep the rest of the
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
- Deploy **after** reviewing the production build.
33
+ Run `bun run build` before you publish.
38
34
  ```
39
35
 
40
- ## Link with context
36
+ ## Write useful links
41
37
 
42
- Describe where a link goes instead of pasting a raw URL. Relative links work
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 the
40
+ Read the [Quickstart](/quickstart) before changing
47
41
  [site configuration](/configuration).
48
42
 
49
- > Keep each paragraph focused on one idea so readers can quickly find the
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
+ }