@heyo-sh/create-heyo-docs 1.0.1 → 2.0.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/deployments/cloudflare/astro/package.json +2 -1
- package/deployments/cloudflare/astro/src/env.d.ts +4 -1
- package/deployments/cloudflare/astro/src/pages/heyo-docs-internal/ai-chat.ts +9 -7
- package/deployments/cloudflare/next/app/heyo-docs-internal/ai-chat/route.ts +9 -7
- package/deployments/cloudflare/next/cloudflare-env.d.ts +4 -1
- package/deployments/cloudflare/react-router/app/cloudflare-env.d.ts +4 -1
- package/deployments/cloudflare/react-router/app/routes/ai-chat.ts +9 -8
- package/deployments/cloudflare/react-router/package.json +2 -1
- package/deployments/vercel/astro/package.json +1 -0
- package/dist/index.js +24 -4
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/templates/astro/content/index.mdx +8 -0
- package/templates/astro/heyo-docs.config.ts +4 -48
- package/templates/astro/src/components/docs-app.tsx +30 -130
- package/templates/astro/src/heyo-docs-icons.tsx +3 -1
- package/templates/astro/src/layouts/docs-layout.astro +10 -436
- package/templates/astro/src/lib/docs.ts +3 -2
- package/templates/astro/src/lib/openapi-request.ts +6 -146
- package/templates/astro/src/pages/[...slug].astro +7 -15
- package/templates/astro/src/pages/[...slug].md.ts +4 -1
- package/templates/astro/src/pages/heyo-docs-internal/ai-chat.ts +5 -7
- package/templates/astro/src/pages/heyo-docs-internal/openapi-request.ts +6 -0
- package/templates/astro/src/pages/index.astro +18 -9
- package/templates/astro/src/pages/llms-full.txt.ts +1 -1
- package/templates/astro/src/pages/llms.txt.ts +1 -1
- package/templates/astro/src/pages/rss.xml.ts +1 -1
- package/templates/astro/src/pages/sitemap.xml.ts +2 -2
- package/templates/astro/src/virtual.d.ts +5 -5
- package/templates/next/app/[[...slug]]/page.tsx +10 -9
- package/templates/next/app/components/docs-app.tsx +28 -120
- package/templates/next/app/heyo-docs-icons.tsx +1 -1
- package/templates/next/app/heyo-docs-internal/ai-chat/route.ts +6 -7
- package/templates/next/app/heyo-docs-internal/markdown/[[...slug]]/route.ts +1 -1
- package/templates/next/app/layout.tsx +25 -444
- package/templates/next/app/lib/docs.ts +3 -3
- package/templates/next/app/lib/openapi-request.ts +4 -136
- package/templates/next/app/llms-full.txt/route.ts +1 -1
- package/templates/next/app/llms.txt/route.ts +1 -1
- package/templates/next/app/rss.xml/route.ts +1 -1
- package/templates/next/app/sitemap.xml/route.ts +1 -1
- package/templates/next/content/index.mdx +8 -0
- package/templates/next/heyo-docs.config.ts +3 -47
- package/templates/next/next.config.ts +7 -1
- package/templates/react-router/app/heyo-docs-icons.tsx +3 -1
- package/templates/react-router/app/root.tsx +28 -465
- package/templates/react-router/app/routes/ai-chat.ts +4 -8
- package/templates/react-router/app/routes/docs.tsx +22 -63
- package/templates/react-router/app/routes/home.tsx +6 -1
- package/templates/react-router/app/routes/llms-full.ts +1 -1
- package/templates/react-router/app/routes/llms.ts +1 -1
- package/templates/react-router/app/routes/markdown.ts +4 -1
- package/templates/react-router/app/routes/openapi-request.ts +11 -144
- package/templates/react-router/app/routes/rss.ts +1 -1
- package/templates/react-router/app/routes/sitemap.ts +5 -8
- package/templates/react-router/app/virtual.d.ts +5 -5
- package/templates/react-router/content/index.mdx +8 -0
- package/templates/react-router/heyo-docs.config.ts +4 -48
- package/templates/astro/content/api-overview.mdx +0 -20
- package/templates/astro/content/assets/local-architecture.svg +0 -22
- package/templates/astro/content/assets/quick-reference.txt +0 -5
- package/templates/astro/content/changelog.mdx +0 -38
- package/templates/astro/content/configuration.mdx +0 -117
- package/templates/astro/content/deploying.mdx +0 -70
- package/templates/astro/content/essentials/callouts.mdx +0 -34
- package/templates/astro/content/essentials/code-blocks.mdx +0 -43
- package/templates/astro/content/essentials/lists.mdx +0 -36
- package/templates/astro/content/essentials/tables.mdx +0 -30
- package/templates/astro/content/essentials/tabs.mdx +0 -40
- package/templates/astro/content/essentials/text-styling.mdx +0 -43
- package/templates/astro/content/getting-started.mdx +0 -16
- package/templates/astro/content/mdx-components.mdx +0 -44
- package/templates/astro/content/openapi-petstore.json +0 -160
- package/templates/astro/content/openapi.json +0 -278
- package/templates/astro/content/quickstart.mdx +0 -60
- package/templates/astro/src/components/theme-provider.tsx +0 -106
- package/templates/astro/src/lib/seo.ts +0 -221
- package/templates/astro/src/lib/theme.ts +0 -74
- package/templates/next/app/components/theme-provider.tsx +0 -93
- package/templates/next/app/lib/seo.ts +0 -189
- package/templates/next/app/lib/theme.ts +0 -61
- package/templates/next/content/api-overview.mdx +0 -20
- package/templates/next/content/assets/local-architecture.svg +0 -22
- package/templates/next/content/assets/quick-reference.txt +0 -5
- package/templates/next/content/changelog.mdx +0 -38
- package/templates/next/content/configuration.mdx +0 -117
- package/templates/next/content/deploying.mdx +0 -70
- package/templates/next/content/essentials/callouts.mdx +0 -34
- package/templates/next/content/essentials/code-blocks.mdx +0 -43
- package/templates/next/content/essentials/lists.mdx +0 -36
- package/templates/next/content/essentials/tables.mdx +0 -30
- package/templates/next/content/essentials/tabs.mdx +0 -40
- package/templates/next/content/essentials/text-styling.mdx +0 -43
- package/templates/next/content/getting-started.mdx +0 -16
- package/templates/next/content/mdx-components.mdx +0 -41
- package/templates/next/content/openapi-petstore.json +0 -160
- package/templates/next/content/openapi.json +0 -278
- package/templates/next/content/quickstart.mdx +0 -60
- package/templates/react-router/app/components/theme-provider.tsx +0 -106
- package/templates/react-router/app/lib/theme.ts +0 -74
- package/templates/react-router/content/api-overview.mdx +0 -20
- package/templates/react-router/content/assets/local-architecture.svg +0 -22
- package/templates/react-router/content/assets/quick-reference.txt +0 -5
- package/templates/react-router/content/changelog.mdx +0 -38
- package/templates/react-router/content/configuration.mdx +0 -117
- package/templates/react-router/content/deploying.mdx +0 -70
- package/templates/react-router/content/essentials/callouts.mdx +0 -34
- package/templates/react-router/content/essentials/code-blocks.mdx +0 -43
- package/templates/react-router/content/essentials/lists.mdx +0 -36
- package/templates/react-router/content/essentials/tables.mdx +0 -30
- package/templates/react-router/content/essentials/tabs.mdx +0 -40
- package/templates/react-router/content/essentials/text-styling.mdx +0 -43
- package/templates/react-router/content/getting-started.mdx +0 -16
- package/templates/react-router/content/mdx-components.mdx +0 -293
- package/templates/react-router/content/openapi-petstore.json +0 -160
- package/templates/react-router/content/openapi.json +0 -278
- package/templates/react-router/content/quickstart.mdx +0 -60
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Callouts
|
|
3
|
-
description: Draw attention to a tip, warning, prerequisite, or result.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Callouts
|
|
7
|
-
|
|
8
|
-
Use a callout when a reader should not miss a detail.
|
|
9
|
-
|
|
10
|
-
## Add a tip
|
|
11
|
-
|
|
12
|
-
<Callout type="tip" title="Keep examples focused">
|
|
13
|
-
Show one idea at a time so readers can apply it quickly.
|
|
14
|
-
</Callout>
|
|
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
|
-
|
|
25
|
-
<Callout type="warning" title="Preview before publishing">
|
|
26
|
-
Run the production build after changing navigation or MDX.
|
|
27
|
-
</Callout>
|
|
28
|
-
|
|
29
|
-
## Keep it short
|
|
30
|
-
|
|
31
|
-
<Callout type="info" title="Configuration and content work together">
|
|
32
|
-
Navigation belongs in <code>heyo-docs.config.ts</code>. Titles and
|
|
33
|
-
descriptions belong in page frontmatter.
|
|
34
|
-
</Callout>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Code Blocks
|
|
3
|
-
description: Add clear, copyable commands and configuration examples.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Code Blocks
|
|
7
|
-
|
|
8
|
-
Show one task per example. Add a language so the code is easy to read.
|
|
9
|
-
|
|
10
|
-
## Add a command
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
bun run dev
|
|
14
|
-
bun run build
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Add a file name
|
|
18
|
-
|
|
19
|
-
Use `CodeBlock` when the file name helps explain where the code belongs.
|
|
20
|
-
|
|
21
|
-
<CodeBlock language="ts" title="heyo-docs.config.ts" showLineNumbers>
|
|
22
|
-
{`export default heyoDocs({
|
|
23
|
-
title: "Orbit Docs",
|
|
24
|
-
content: "content",
|
|
25
|
-
theme: "grain",
|
|
26
|
-
});`}
|
|
27
|
-
</CodeBlock>
|
|
28
|
-
|
|
29
|
-
## Show alternatives
|
|
30
|
-
|
|
31
|
-
Use `CodeBlockGroup` for equivalent commands, such as package managers.
|
|
32
|
-
|
|
33
|
-
<CodeBlockGroup defaultValue="bun" variant="line">
|
|
34
|
-
<CodeBlock language="bash" title="bun">
|
|
35
|
-
{"bun add @heyo-sh/heyo-docs"}
|
|
36
|
-
</CodeBlock>
|
|
37
|
-
<CodeBlock language="bash" title="npm">
|
|
38
|
-
{"npm install @heyo-sh/heyo-docs"}
|
|
39
|
-
</CodeBlock>
|
|
40
|
-
<CodeBlock language="bash" title="pnpm">
|
|
41
|
-
{"pnpm add @heyo-sh/heyo-docs"}
|
|
42
|
-
</CodeBlock>
|
|
43
|
-
</CodeBlockGroup>
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Lists
|
|
3
|
-
description: Use lists to make choices and short steps easy to scan.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Lists
|
|
7
|
-
|
|
8
|
-
Use a list when readers need to scan choices or follow a short sequence.
|
|
9
|
-
|
|
10
|
-
## Add a bullet list
|
|
11
|
-
|
|
12
|
-
Use bullets when the order does not matter.
|
|
13
|
-
|
|
14
|
-
- Keep MDX pages in the `content` directory.
|
|
15
|
-
- Add important routes to `heyo-docs.config.ts`.
|
|
16
|
-
- Build the project before publishing.
|
|
17
|
-
|
|
18
|
-
## Add numbered steps
|
|
19
|
-
|
|
20
|
-
Use numbers when the order matters.
|
|
21
|
-
|
|
22
|
-
1. Create an MDX file.
|
|
23
|
-
2. Add its path to a sidebar section.
|
|
24
|
-
3. Start the development server.
|
|
25
|
-
4. Review the rendered route.
|
|
26
|
-
|
|
27
|
-
## Add one level when needed
|
|
28
|
-
|
|
29
|
-
Use a nested list only for a direct relationship.
|
|
30
|
-
|
|
31
|
-
- Prepare the release:
|
|
32
|
-
- Review the changed pages.
|
|
33
|
-
- Confirm navigation order.
|
|
34
|
-
- Run the production build.
|
|
35
|
-
|
|
36
|
-
Use `Steps` when each step needs a command or more explanation.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Tables
|
|
3
|
-
description: Compare a small set of options with a simple Markdown table.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Tables
|
|
7
|
-
|
|
8
|
-
Use a table to compare the same details across a small number of options.
|
|
9
|
-
|
|
10
|
-
## Add a table
|
|
11
|
-
|
|
12
|
-
| Setting | Purpose | Example |
|
|
13
|
-
| --------- | -------------------------------------- | ---------------------------- |
|
|
14
|
-
| `content` | Directory containing MDX source files. | `"content"` |
|
|
15
|
-
| `theme` | Built-in documentation theme. | `"grain"` |
|
|
16
|
-
| `mode` | Initial color preference. | `"system"` |
|
|
17
|
-
| `siteUrl` | Canonical public site origin. | `"https://docs.example.com"` |
|
|
18
|
-
|
|
19
|
-
## Keep it readable
|
|
20
|
-
|
|
21
|
-
Use short headings and short cells. Put long explanations in a section below
|
|
22
|
-
the table.
|
|
23
|
-
|
|
24
|
-
| Use a table for | Use a section for |
|
|
25
|
-
| ---------------------- | ---------------------- |
|
|
26
|
-
| Compact comparisons | A multi-step procedure |
|
|
27
|
-
| Option defaults | A detailed explanation |
|
|
28
|
-
| Short reference values | A large code example |
|
|
29
|
-
|
|
30
|
-
Use a numbered list when readers must act in a specific order.
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Tabs
|
|
3
|
-
description: Let readers switch between equivalent commands or platforms.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Tabs
|
|
7
|
-
|
|
8
|
-
Use tabs for equivalent ways to complete the same task. Keep their labels
|
|
9
|
-
short.
|
|
10
|
-
|
|
11
|
-
## Add tabs
|
|
12
|
-
|
|
13
|
-
<Tabs defaultValue="typescript" variant="line">
|
|
14
|
-
<Tab title="JavaScript" value="javascript">
|
|
15
|
-
Import the package from your JavaScript entry point.
|
|
16
|
-
</Tab>
|
|
17
|
-
<Tab title="TypeScript" value="typescript">
|
|
18
|
-
Import the package with full type information and keep configuration typed.
|
|
19
|
-
</Tab>
|
|
20
|
-
</Tabs>
|
|
21
|
-
|
|
22
|
-
## Compare platforms
|
|
23
|
-
|
|
24
|
-
Each tab should answer the same question for a different platform.
|
|
25
|
-
|
|
26
|
-
<Tabs defaultValue="vercel" variant="line">
|
|
27
|
-
<Tab title="Vercel" value="vercel">
|
|
28
|
-
Connect the repository and let Vercel detect the framework.
|
|
29
|
-
</Tab>
|
|
30
|
-
<Tab title="Cloudflare" value="cloudflare">
|
|
31
|
-
Deploy the generated static site when your team already uses Cloudflare.
|
|
32
|
-
</Tab>
|
|
33
|
-
<Tab title="Static host" value="static">
|
|
34
|
-
Upload the build output to any host that serves static files.
|
|
35
|
-
</Tab>
|
|
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,43 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Text Styling
|
|
3
|
-
description: Use simple Markdown for headings, emphasis, links, and quotes.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Text Styling
|
|
7
|
-
|
|
8
|
-
Use regular Markdown for most documentation. Keep the text short and let
|
|
9
|
-
headings show readers where to look next.
|
|
10
|
-
|
|
11
|
-
## Add headings
|
|
12
|
-
|
|
13
|
-
Use `##` for a main section and `###` only for a useful subsection.
|
|
14
|
-
|
|
15
|
-
```md
|
|
16
|
-
## Configure navigation
|
|
17
|
-
|
|
18
|
-
Add pages in the order readers should follow.
|
|
19
|
-
|
|
20
|
-
### Add an external resource
|
|
21
|
-
|
|
22
|
-
Link to a resource outside your documentation.
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Highlight important text
|
|
26
|
-
|
|
27
|
-
Use **bold** for an important choice and inline `code` for values readers need
|
|
28
|
-
to copy.
|
|
29
|
-
|
|
30
|
-
```md
|
|
31
|
-
Set `content: "content"` in `heyo-docs.config.ts`.
|
|
32
|
-
|
|
33
|
-
Run `bun run build` before you publish.
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Write useful links
|
|
37
|
-
|
|
38
|
-
Use the destination as the link text. It is easier to scan than a raw URL.
|
|
39
|
-
|
|
40
|
-
Read the [Quickstart](/quickstart) before changing
|
|
41
|
-
[site configuration](/configuration).
|
|
42
|
-
|
|
43
|
-
> Keep one idea in each short paragraph.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Getting started
|
|
3
|
-
description: Run your new documentation site locally.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Getting started
|
|
7
|
-
|
|
8
|
-
Install dependencies with your chosen package manager and start the development server.
|
|
9
|
-
|
|
10
|
-
## Create a page
|
|
11
|
-
|
|
12
|
-
Create `content/guides/deploying.mdx` to get the `/guides/deploying` route. Its frontmatter controls its title and description.
|
|
13
|
-
|
|
14
|
-
## Configure the documentation
|
|
15
|
-
|
|
16
|
-
Use `heyo-docs.config.ts` to change the title, colors, tabs, sidebar groups, footer links and selected theme without regenerating your project. Add pages or directories to a section's `pages` list to control the sidebar order.
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: MDX components
|
|
3
|
-
description: Every built-in MDX component is available without an import.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# MDX components
|
|
7
|
-
|
|
8
|
-
Every built-in component is available in a Next.js MDX page without an import.
|
|
9
|
-
|
|
10
|
-
## Callout
|
|
11
|
-
|
|
12
|
-
<Callout
|
|
13
|
-
type="tip"
|
|
14
|
-
title="No imports needed"
|
|
15
|
-
description="Use the documentation components directly in your MDX files."
|
|
16
|
-
/>
|
|
17
|
-
|
|
18
|
-
## Tabs
|
|
19
|
-
|
|
20
|
-
<Tabs defaultValue="npm" variant="line">
|
|
21
|
-
<Tab title="npm" value="npm">
|
|
22
|
-
npm run dev
|
|
23
|
-
</Tab>
|
|
24
|
-
<Tab title="Bun" value="bun">
|
|
25
|
-
bun run dev
|
|
26
|
-
</Tab>
|
|
27
|
-
</Tabs>
|
|
28
|
-
|
|
29
|
-
## Code blocks
|
|
30
|
-
|
|
31
|
-
`CodeBlock` preserves every newline as a hard code line.
|
|
32
|
-
|
|
33
|
-
<CodeBlock language="tsx" title="app/page.tsx" showLineNumbers>
|
|
34
|
-
{`export default function Page() {
|
|
35
|
-
return <h1>Hello</h1>;
|
|
36
|
-
}`}
|
|
37
|
-
</CodeBlock>
|
|
38
|
-
|
|
39
|
-
## More components
|
|
40
|
-
|
|
41
|
-
`Accordion`, `Button`, `Columns`, `File`, `GitHub`, `HoverCard`, `Image`, `Mermaid`, `RelatedTopics`, `Steps`, `Tree`, `Video`, and the remaining primitives use the same MDX contract as every Heyo Docs template.
|
|
@@ -1,160 +0,0 @@
|
|
|
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
|
-
}
|