@axerity/cli 0.1.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/LICENSE +21 -0
- package/README.md +1 -0
- package/axerity.default.json +135 -0
- package/axerity.schema.json +268 -0
- package/bin/axerity.js +305 -0
- package/mdsvex.config.js +261 -0
- package/package.json +103 -0
- package/scripts/prepare-engine.mjs +20 -0
- package/src/app.d.ts +17 -0
- package/src/app.html +39 -0
- package/src/content/demo/api/meta.json +5 -0
- package/src/content/demo/api/pet/add-pet.md +105 -0
- package/src/content/demo/api/pet/delete-pet.md +70 -0
- package/src/content/demo/api/pet/find-by-status.md +72 -0
- package/src/content/demo/api/pet/find-by-tags.md +64 -0
- package/src/content/demo/api/pet/get-pet.md +99 -0
- package/src/content/demo/api/pet/meta.json +15 -0
- package/src/content/demo/api/pet/pet-object.md +112 -0
- package/src/content/demo/api/pet/update-pet-with-form.md +69 -0
- package/src/content/demo/api/pet/update-pet.md +79 -0
- package/src/content/demo/api/pet/upload-image.md +79 -0
- package/src/content/demo/api/store/delete-order.md +62 -0
- package/src/content/demo/api/store/get-order.md +70 -0
- package/src/content/demo/api/store/inventory.md +54 -0
- package/src/content/demo/api/store/meta.json +5 -0
- package/src/content/demo/api/store/order-object.md +77 -0
- package/src/content/demo/api/store/place-order.md +83 -0
- package/src/content/demo/api/user/create-user.md +69 -0
- package/src/content/demo/api/user/create-with-list.md +57 -0
- package/src/content/demo/api/user/delete-user.md +61 -0
- package/src/content/demo/api/user/get-user.md +69 -0
- package/src/content/demo/api/user/login.md +80 -0
- package/src/content/demo/api/user/logout.md +45 -0
- package/src/content/demo/api/user/meta.json +14 -0
- package/src/content/demo/api/user/update-user.md +69 -0
- package/src/content/demo/api/user/user-object.md +85 -0
- package/src/content/demo/changelog.md +44 -0
- package/src/content/demo/components/accordion.md +70 -0
- package/src/content/demo/components/api.md +185 -0
- package/src/content/demo/components/badge.md +34 -0
- package/src/content/demo/components/callout.md +83 -0
- package/src/content/demo/components/cards.md +88 -0
- package/src/content/demo/components/code-group.md +55 -0
- package/src/content/demo/components/columns.md +42 -0
- package/src/content/demo/components/frame.md +51 -0
- package/src/content/demo/components/icon.md +54 -0
- package/src/content/demo/components/kbd.md +28 -0
- package/src/content/demo/components/meta.json +26 -0
- package/src/content/demo/components/roadmap.md +86 -0
- package/src/content/demo/components/steps.md +72 -0
- package/src/content/demo/components/tabs.md +146 -0
- package/src/content/demo/components/tooltip.md +44 -0
- package/src/content/demo/components/tree.md +83 -0
- package/src/content/demo/components/type-table.md +77 -0
- package/src/content/demo/components/update.md +48 -0
- package/src/content/demo/components/video.md +56 -0
- package/src/content/demo/components/webhooks.md +109 -0
- package/src/content/demo/components/websockets.md +101 -0
- package/src/content/demo/configuration/ai.md +40 -0
- package/src/content/demo/configuration/cli.md +46 -0
- package/src/content/demo/configuration/deployment.md +105 -0
- package/src/content/demo/configuration/index.md +92 -0
- package/src/content/demo/configuration/layouts.md +51 -0
- package/src/content/demo/configuration/meta.json +5 -0
- package/src/content/demo/configuration/navigation.md +167 -0
- package/src/content/demo/configuration/openapi.md +103 -0
- package/src/content/demo/configuration/search.md +36 -0
- package/src/content/demo/index.md +59 -0
- package/src/content/demo/installation.md +49 -0
- package/src/content/demo/meta.json +15 -0
- package/src/content/demo/quick-start.md +47 -0
- package/src/content/demo/theming/advanced.md +116 -0
- package/src/content/demo/theming/code.md +66 -0
- package/src/content/demo/theming/colors.md +103 -0
- package/src/content/demo/theming/index.md +88 -0
- package/src/content/demo/theming/layout.md +71 -0
- package/src/content/demo/theming/meta.json +5 -0
- package/src/content/demo/theming/themes.md +99 -0
- package/src/content/demo/theming/typography.md +83 -0
- package/src/content/demo/writing/code-blocks.md +154 -0
- package/src/content/demo/writing/diagrams.md +44 -0
- package/src/content/demo/writing/frontmatter.md +33 -0
- package/src/content/demo/writing/markdown.md +62 -0
- package/src/content/demo/writing/meta.json +5 -0
- package/src/hooks.server.ts +49 -0
- package/src/lib/assets/favicon.svg +1 -0
- package/src/lib/base.ts +12 -0
- package/src/lib/components/DynamicIcon.svelte +26 -0
- package/src/lib/components/docs/Analytics.svelte +38 -0
- package/src/lib/components/docs/Banner.svelte +44 -0
- package/src/lib/components/docs/Breadcrumbs.svelte +38 -0
- package/src/lib/components/docs/CopyPageMenu.svelte +119 -0
- package/src/lib/components/docs/DocsLayout.svelte +192 -0
- package/src/lib/components/docs/Footer.svelte +60 -0
- package/src/lib/components/docs/Mermaid.svelte +39 -0
- package/src/lib/components/docs/Navbar.svelte +144 -0
- package/src/lib/components/docs/PageMeta.svelte +35 -0
- package/src/lib/components/docs/PageNav.svelte +44 -0
- package/src/lib/components/docs/SearchDialog.svelte +182 -0
- package/src/lib/components/docs/Sidebar.svelte +85 -0
- package/src/lib/components/docs/SidebarDropdown.svelte +56 -0
- package/src/lib/components/docs/SidebarFooterLinks.svelte +19 -0
- package/src/lib/components/docs/SidebarGroup.svelte +54 -0
- package/src/lib/components/docs/SidebarLink.svelte +67 -0
- package/src/lib/components/docs/TableOfContents.svelte +77 -0
- package/src/lib/components/docs/ThemeToggle.svelte +19 -0
- package/src/lib/components/docs/VersionSwitcher.svelte +80 -0
- package/src/lib/components/kit/Accordion.svelte +60 -0
- package/src/lib/components/kit/AccordionGroup.svelte +13 -0
- package/src/lib/components/kit/Badge.svelte +32 -0
- package/src/lib/components/kit/Callout.svelte +51 -0
- package/src/lib/components/kit/Card.svelte +72 -0
- package/src/lib/components/kit/CardGroup.svelte +21 -0
- package/src/lib/components/kit/CodeGroup.svelte +65 -0
- package/src/lib/components/kit/Columns.svelte +26 -0
- package/src/lib/components/kit/Event.svelte +23 -0
- package/src/lib/components/kit/EventList.svelte +9 -0
- package/src/lib/components/kit/File.svelte +15 -0
- package/src/lib/components/kit/Folder.svelte +46 -0
- package/src/lib/components/kit/Frame.svelte +81 -0
- package/src/lib/components/kit/Icon.svelte +17 -0
- package/src/lib/components/kit/Kbd.svelte +11 -0
- package/src/lib/components/kit/Roadmap.svelte +15 -0
- package/src/lib/components/kit/RoadmapItem.svelte +109 -0
- package/src/lib/components/kit/Step.svelte +63 -0
- package/src/lib/components/kit/Steps.svelte +16 -0
- package/src/lib/components/kit/Tab.svelte +27 -0
- package/src/lib/components/kit/Tabs.svelte +75 -0
- package/src/lib/components/kit/Tooltip.svelte +33 -0
- package/src/lib/components/kit/Tree.svelte +11 -0
- package/src/lib/components/kit/TypeTable.svelte +187 -0
- package/src/lib/components/kit/Update.svelte +32 -0
- package/src/lib/components/kit/Video.svelte +64 -0
- package/src/lib/components/kit/accordion-context.ts +1 -0
- package/src/lib/components/kit/api/Api.svelte +80 -0
- package/src/lib/components/kit/api/ApiExamplePanel.svelte +100 -0
- package/src/lib/components/kit/api/ApiField.svelte +124 -0
- package/src/lib/components/kit/api/Channel.svelte +121 -0
- package/src/lib/components/kit/api/Endpoint.svelte +116 -0
- package/src/lib/components/kit/api/Enum.svelte +44 -0
- package/src/lib/components/kit/api/EnumValues.svelte +35 -0
- package/src/lib/components/kit/api/Expandable.svelte +70 -0
- package/src/lib/components/kit/api/Message.svelte +67 -0
- package/src/lib/components/kit/api/ObjectExample.svelte +11 -0
- package/src/lib/components/kit/api/RequestExample.svelte +11 -0
- package/src/lib/components/kit/api/ResponseExample.svelte +11 -0
- package/src/lib/components/kit/api/Webhook.svelte +115 -0
- package/src/lib/components/kit/api/api-context.ts +15 -0
- package/src/lib/components/kit/tabs-context.ts +8 -0
- package/src/lib/components/kit/tabs-store.svelte.ts +28 -0
- package/src/lib/config/site.ts +34 -0
- package/src/lib/content/index.ts +50 -0
- package/src/lib/content/raw.ts +21 -0
- package/src/lib/content/tree.ts +169 -0
- package/src/lib/index.ts +79 -0
- package/src/lib/nav-match.ts +23 -0
- package/src/lib/openapi/generate.ts +629 -0
- package/src/lib/server/og.ts +140 -0
- package/src/lib/state/search.svelte.ts +9 -0
- package/src/lib/state/theme.svelte.ts +58 -0
- package/src/lib/types.ts +216 -0
- package/src/params/docpage.ts +3 -0
- package/src/params/mdfile.ts +3 -0
- package/src/routes/+error.svelte +46 -0
- package/src/routes/+layout.svelte +25 -0
- package/src/routes/[...path=mdfile]/+server.ts +21 -0
- package/src/routes/[...slug=docpage]/+page.svelte +63 -0
- package/src/routes/[...slug=docpage]/+page.ts +44 -0
- package/src/routes/layout.css +897 -0
- package/src/routes/llms-full.txt/+server.ts +22 -0
- package/src/routes/llms.txt/+server.ts +20 -0
- package/src/routes/og/[...slug]/+server.ts +77 -0
- package/src/routes/rss.xml/+server.ts +65 -0
- package/src/routes/search.json/+server.ts +54 -0
- package/src/routes/sitemap.xml/+server.ts +21 -0
- package/static/favicon-dark.svg +6 -0
- package/static/favicon-light.svg +6 -0
- package/static/favicon.svg +14 -0
- package/static/fonts/geist-400.ttf +0 -0
- package/static/fonts/geist-600.ttf +0 -0
- package/static/fonts/geist-700.ttf +0 -0
- package/static/og-image.png +0 -0
- package/static/robots.txt +4 -0
- package/svelte.config.js +35 -0
- package/tsconfig.json +20 -0
- package/vite.config.ts +46 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Get user by username
|
|
3
|
+
description: Return a single user.
|
|
4
|
+
icon: user
|
|
5
|
+
layout: api
|
|
6
|
+
method: GET
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import { Api, Endpoint, ParamField, ResponseField, RequestExample, ResponseExample, ObjectExample } from '$lib';
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
# Get user by username
|
|
14
|
+
|
|
15
|
+
Get user details based on the username. Use `user1` for testing.
|
|
16
|
+
|
|
17
|
+
<Api>
|
|
18
|
+
|
|
19
|
+
<Endpoint method="GET" path={'/user/{username}'} baseUrl="https://petstore3.swagger.io/api/v3" />
|
|
20
|
+
|
|
21
|
+
## Path parameters
|
|
22
|
+
|
|
23
|
+
<ParamField name="username" type="string" required>
|
|
24
|
+
|
|
25
|
+
The name of the user to fetch.
|
|
26
|
+
|
|
27
|
+
</ParamField>
|
|
28
|
+
|
|
29
|
+
## Returns
|
|
30
|
+
|
|
31
|
+
Returns the [User](/api/user/user-object).
|
|
32
|
+
|
|
33
|
+
<ResponseField name="id" type="integer">
|
|
34
|
+
|
|
35
|
+
Unique id for the user.
|
|
36
|
+
|
|
37
|
+
</ResponseField>
|
|
38
|
+
|
|
39
|
+
<ResponseField name="username" type="string">
|
|
40
|
+
|
|
41
|
+
The user's login name.
|
|
42
|
+
|
|
43
|
+
</ResponseField>
|
|
44
|
+
|
|
45
|
+
<RequestExample title="cURL">
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
curl https://petstore3.swagger.io/api/v3/user/user1
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
</RequestExample>
|
|
52
|
+
|
|
53
|
+
<ResponseExample title="200 OK">
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{ "id": 10, "username": "user1", "email": "john@email.com" }
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
</ResponseExample>
|
|
60
|
+
|
|
61
|
+
<ResponseExample title="404 Not Found">
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{ "code": 404, "message": "User not found" }
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
</ResponseExample>
|
|
68
|
+
|
|
69
|
+
</Api>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Log in
|
|
3
|
+
description: Log a user into the system.
|
|
4
|
+
icon: user
|
|
5
|
+
layout: api
|
|
6
|
+
method: GET
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import { Api, Endpoint, ParamField, ResponseField, RequestExample, ResponseExample } from '$lib';
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
# Log in
|
|
14
|
+
|
|
15
|
+
Log a user into the system. On success the response headers include rate limit
|
|
16
|
+
and token expiry information.
|
|
17
|
+
|
|
18
|
+
<Api>
|
|
19
|
+
|
|
20
|
+
<Endpoint method="GET" path="/user/login" baseUrl="https://petstore3.swagger.io/api/v3" />
|
|
21
|
+
|
|
22
|
+
## Query parameters
|
|
23
|
+
|
|
24
|
+
<ParamField name="username" type="string">
|
|
25
|
+
|
|
26
|
+
The user name for login.
|
|
27
|
+
|
|
28
|
+
</ParamField>
|
|
29
|
+
|
|
30
|
+
<ParamField name="password" type="string">
|
|
31
|
+
|
|
32
|
+
The password for login in clear text.
|
|
33
|
+
|
|
34
|
+
</ParamField>
|
|
35
|
+
|
|
36
|
+
## Returns
|
|
37
|
+
|
|
38
|
+
<ResponseField name="token" type="string">
|
|
39
|
+
|
|
40
|
+
A session token, returned as the response body.
|
|
41
|
+
|
|
42
|
+
</ResponseField>
|
|
43
|
+
|
|
44
|
+
<ResponseField name="X-Rate-Limit" type="integer">
|
|
45
|
+
|
|
46
|
+
Calls per hour allowed for the user. Returned as a response header.
|
|
47
|
+
|
|
48
|
+
</ResponseField>
|
|
49
|
+
|
|
50
|
+
<ResponseField name="X-Expires-After" type="string">
|
|
51
|
+
|
|
52
|
+
The date in UTC when the token expires. Returned as a response header.
|
|
53
|
+
|
|
54
|
+
</ResponseField>
|
|
55
|
+
|
|
56
|
+
<RequestExample title="cURL">
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
curl "https://petstore3.swagger.io/api/v3/user/login?username=theUser&password=12345"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
</RequestExample>
|
|
63
|
+
|
|
64
|
+
<ResponseExample title="200 OK">
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
"logged in user session: 1640995200000"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
</ResponseExample>
|
|
71
|
+
|
|
72
|
+
<ResponseExample title="400 Bad Request">
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{ "code": 400, "message": "Invalid username/password supplied" }
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
</ResponseExample>
|
|
79
|
+
|
|
80
|
+
</Api>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Log out
|
|
3
|
+
description: Log out the current session.
|
|
4
|
+
icon: user
|
|
5
|
+
layout: api
|
|
6
|
+
method: GET
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import { Api, Endpoint, ResponseField, RequestExample, ResponseExample } from '$lib';
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
# Log out
|
|
14
|
+
|
|
15
|
+
Log the current user out of the system.
|
|
16
|
+
|
|
17
|
+
<Api>
|
|
18
|
+
|
|
19
|
+
<Endpoint method="GET" path="/user/logout" baseUrl="https://petstore3.swagger.io/api/v3" />
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
<ResponseField name="code" type="integer">
|
|
24
|
+
|
|
25
|
+
The HTTP status code of the result.
|
|
26
|
+
|
|
27
|
+
</ResponseField>
|
|
28
|
+
|
|
29
|
+
<RequestExample title="cURL">
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
curl https://petstore3.swagger.io/api/v3/user/logout
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
</RequestExample>
|
|
36
|
+
|
|
37
|
+
<ResponseExample title="200 OK">
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{ "code": 200, "message": "ok" }
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
</ResponseExample>
|
|
44
|
+
|
|
45
|
+
</Api>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Update a user
|
|
3
|
+
description: Update an existing user.
|
|
4
|
+
icon: user
|
|
5
|
+
layout: api
|
|
6
|
+
method: PUT
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import { Api, Endpoint, ParamField, ResponseField, RequestExample, ResponseExample } from '$lib';
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
# Update a user
|
|
14
|
+
|
|
15
|
+
This can only be done by a logged in user.
|
|
16
|
+
|
|
17
|
+
<Api>
|
|
18
|
+
|
|
19
|
+
<Endpoint method="PUT" path={'/user/{username}'} baseUrl="https://petstore3.swagger.io/api/v3" />
|
|
20
|
+
|
|
21
|
+
## Path parameters
|
|
22
|
+
|
|
23
|
+
<ParamField name="username" type="string" required>
|
|
24
|
+
|
|
25
|
+
The name of the user to update.
|
|
26
|
+
|
|
27
|
+
</ParamField>
|
|
28
|
+
|
|
29
|
+
## Body parameters
|
|
30
|
+
|
|
31
|
+
<ParamField name="email" type="string">
|
|
32
|
+
|
|
33
|
+
The user's email address.
|
|
34
|
+
|
|
35
|
+
</ParamField>
|
|
36
|
+
|
|
37
|
+
<ParamField name="password" type="string">
|
|
38
|
+
|
|
39
|
+
The user's password.
|
|
40
|
+
|
|
41
|
+
</ParamField>
|
|
42
|
+
|
|
43
|
+
## Returns
|
|
44
|
+
|
|
45
|
+
<ResponseField name="code" type="integer">
|
|
46
|
+
|
|
47
|
+
The HTTP status code of the result.
|
|
48
|
+
|
|
49
|
+
</ResponseField>
|
|
50
|
+
|
|
51
|
+
<RequestExample title="cURL">
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
curl -X PUT https://petstore3.swagger.io/api/v3/user/theUser \
|
|
55
|
+
-H "Content-Type: application/json" \
|
|
56
|
+
-d '{ "email": "new@email.com" }'
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
</RequestExample>
|
|
60
|
+
|
|
61
|
+
<ResponseExample title="200 OK">
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{ "code": 200, "message": "ok" }
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
</ResponseExample>
|
|
68
|
+
|
|
69
|
+
</Api>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: The User object
|
|
3
|
+
description: The shape of a User resource.
|
|
4
|
+
icon: user
|
|
5
|
+
layout: api
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
import { Api, ResponseField, ObjectExample } from '$lib';
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
# The User object
|
|
13
|
+
|
|
14
|
+
A User is an account in the store.
|
|
15
|
+
|
|
16
|
+
<Api>
|
|
17
|
+
|
|
18
|
+
## Attributes
|
|
19
|
+
|
|
20
|
+
<ResponseField name="id" type="integer">
|
|
21
|
+
|
|
22
|
+
Unique id for the user.
|
|
23
|
+
|
|
24
|
+
</ResponseField>
|
|
25
|
+
|
|
26
|
+
<ResponseField name="username" type="string">
|
|
27
|
+
|
|
28
|
+
The user's login name.
|
|
29
|
+
|
|
30
|
+
</ResponseField>
|
|
31
|
+
|
|
32
|
+
<ResponseField name="firstName" type="string">
|
|
33
|
+
|
|
34
|
+
The user's first name.
|
|
35
|
+
|
|
36
|
+
</ResponseField>
|
|
37
|
+
|
|
38
|
+
<ResponseField name="lastName" type="string">
|
|
39
|
+
|
|
40
|
+
The user's last name.
|
|
41
|
+
|
|
42
|
+
</ResponseField>
|
|
43
|
+
|
|
44
|
+
<ResponseField name="email" type="string">
|
|
45
|
+
|
|
46
|
+
The user's email address.
|
|
47
|
+
|
|
48
|
+
</ResponseField>
|
|
49
|
+
|
|
50
|
+
<ResponseField name="password" type="string">
|
|
51
|
+
|
|
52
|
+
The user's password.
|
|
53
|
+
|
|
54
|
+
</ResponseField>
|
|
55
|
+
|
|
56
|
+
<ResponseField name="phone" type="string">
|
|
57
|
+
|
|
58
|
+
The user's phone number.
|
|
59
|
+
|
|
60
|
+
</ResponseField>
|
|
61
|
+
|
|
62
|
+
<ResponseField name="userStatus" type="integer">
|
|
63
|
+
|
|
64
|
+
The user status.
|
|
65
|
+
|
|
66
|
+
</ResponseField>
|
|
67
|
+
|
|
68
|
+
<ObjectExample title="The User object">
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"id": 10,
|
|
73
|
+
"username": "theUser",
|
|
74
|
+
"firstName": "John",
|
|
75
|
+
"lastName": "James",
|
|
76
|
+
"email": "john@email.com",
|
|
77
|
+
"password": "12345",
|
|
78
|
+
"phone": "12345",
|
|
79
|
+
"userStatus": 1
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
</ObjectExample>
|
|
84
|
+
|
|
85
|
+
</Api>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Changelog
|
|
3
|
+
description: What's new in Axerity.
|
|
4
|
+
icon: history
|
|
5
|
+
date: 2026-06-01
|
|
6
|
+
updated: 2026-06-01
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import { Update, Badge } from '$lib';
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
# Changelog
|
|
14
|
+
|
|
15
|
+
Every notable change, newest first.
|
|
16
|
+
|
|
17
|
+
<Update label="v1.0.0" date="June 1, 2026">
|
|
18
|
+
|
|
19
|
+
The first stable release. <Badge color="success">stable</Badge>
|
|
20
|
+
|
|
21
|
+
- Component kit: callouts, cards, accordions, tabs, code groups, steps, columns, badges, roadmaps, and type tables.
|
|
22
|
+
- Media: framed images with click to zoom, video embeds, and inline icons.
|
|
23
|
+
- API docs: generate a full reference from an OpenAPI spec, plus webhook and WebSocket components.
|
|
24
|
+
- Versioned content with a switcher that follows the reader across versions.
|
|
25
|
+
- The `axerity` CLI: `init`, `dev`, `build`, and `preview`, so there is nothing to clone.
|
|
26
|
+
- Mermaid diagrams, Twoslash type hovers, and YAML highlighting.
|
|
27
|
+
- Build-time search, an RSS feed, and edit links on every page.
|
|
28
|
+
|
|
29
|
+
</Update>
|
|
30
|
+
|
|
31
|
+
<Update label="v0.9.0" date="May 15, 2026">
|
|
32
|
+
|
|
33
|
+
Release candidate. <Badge color="info">beta</Badge>
|
|
34
|
+
|
|
35
|
+
- Config-driven logo, banner, footer, and social links.
|
|
36
|
+
- Dropdown navigation with per-area sidebar tabs.
|
|
37
|
+
|
|
38
|
+
</Update>
|
|
39
|
+
|
|
40
|
+
<Update label="v0.5.0" date="April 2, 2026">
|
|
41
|
+
|
|
42
|
+
- First public preview with Markdown rendering, dark mode, and the flat layout.
|
|
43
|
+
|
|
44
|
+
</Update>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Accordion
|
|
3
|
+
description: Collapsible sections for FAQs and progressive disclosure.
|
|
4
|
+
icon: list
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { Accordion, AccordionGroup } from '$lib';
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
# Accordion
|
|
12
|
+
|
|
13
|
+
Accordions hide secondary content until it's needed, perfect for FAQs, optional
|
|
14
|
+
details, and long reference material.
|
|
15
|
+
|
|
16
|
+
## Single accordion
|
|
17
|
+
|
|
18
|
+
<Accordion title="What is Axerity?">
|
|
19
|
+
|
|
20
|
+
Axerity is a documentation site generator for Svelte. You write Markdown and get a
|
|
21
|
+
fast static site.
|
|
22
|
+
|
|
23
|
+
</Accordion>
|
|
24
|
+
|
|
25
|
+
## Grouped
|
|
26
|
+
|
|
27
|
+
Wrap multiple accordions in an `<AccordionGroup>` to render them as connected
|
|
28
|
+
rows. Pass `open` to expand one by default, and `icon` for a Lucide glyph.
|
|
29
|
+
|
|
30
|
+
<AccordionGroup>
|
|
31
|
+
<Accordion title="Installation" icon="download" open>
|
|
32
|
+
|
|
33
|
+
Run `pnpm install` then `pnpm dev`. See [Installation](/installation) for
|
|
34
|
+
the full walkthrough.
|
|
35
|
+
|
|
36
|
+
</Accordion>
|
|
37
|
+
<Accordion title="Writing content" icon="pencil-line">
|
|
38
|
+
|
|
39
|
+
Drop Markdown files into `src/content/docs`. Folders become sidebar sections.
|
|
40
|
+
|
|
41
|
+
</Accordion>
|
|
42
|
+
<Accordion title="Components" icon="blocks">
|
|
43
|
+
|
|
44
|
+
Import kit components in a page's `<script>` block and use them inline.
|
|
45
|
+
|
|
46
|
+
</Accordion>
|
|
47
|
+
|
|
48
|
+
</AccordionGroup>
|
|
49
|
+
|
|
50
|
+
## Usage
|
|
51
|
+
|
|
52
|
+
```svelte
|
|
53
|
+
<script>
|
|
54
|
+
import { Accordion, AccordionGroup } from '$lib';
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<AccordionGroup>
|
|
58
|
+
<Accordion title="Installation" icon="download" open>
|
|
59
|
+
Run `pnpm install` then `pnpm dev`.
|
|
60
|
+
</Accordion>
|
|
61
|
+
</AccordionGroup>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Props
|
|
65
|
+
|
|
66
|
+
| Prop | Type | Description |
|
|
67
|
+
| ------- | --------- | -------------------------------- |
|
|
68
|
+
| `title` | `string` | Header text (required) |
|
|
69
|
+
| `icon` | `string` | Optional Lucide icon name |
|
|
70
|
+
| `open` | `boolean` | Expand by default (uncontrolled) |
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: API components
|
|
3
|
+
description: Document REST endpoints with fields, examples, and schemas.
|
|
4
|
+
icon: code
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { Api, Endpoint, ParamField, ResponseField, RequestExample, ResponseExample, ObjectExample, Expandable, EnumValues, Enum } from '$lib';
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
# API components
|
|
12
|
+
|
|
13
|
+
These components build a reference for a REST API. Set `layout: api` in the page
|
|
14
|
+
frontmatter to get the wide, two-column layout where examples sit in a sticky
|
|
15
|
+
rail on the right.
|
|
16
|
+
|
|
17
|
+
## Writing an API page
|
|
18
|
+
|
|
19
|
+
Here is a complete page. Set `layout: api`, import the components you need, wrap
|
|
20
|
+
the body in `<Api>`, and leave blank lines around each component so the Markdown
|
|
21
|
+
inside is parsed:
|
|
22
|
+
|
|
23
|
+
````md
|
|
24
|
+
---
|
|
25
|
+
title: Create a pet
|
|
26
|
+
layout: api
|
|
27
|
+
method: POST
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
<script>
|
|
31
|
+
import { Api, Endpoint, ParamField, ResponseField, RequestExample, ResponseExample, EnumValues, Enum } from '$lib';
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
# Create a pet
|
|
35
|
+
|
|
36
|
+
<Api>
|
|
37
|
+
|
|
38
|
+
<Endpoint method="POST" path="/pets" baseUrl="https://api.example.com/v1" />
|
|
39
|
+
|
|
40
|
+
## Body parameters
|
|
41
|
+
|
|
42
|
+
<ParamField name="name" type="string" required>
|
|
43
|
+
|
|
44
|
+
The pet's name.
|
|
45
|
+
|
|
46
|
+
</ParamField>
|
|
47
|
+
|
|
48
|
+
<ParamField name="status" type="string" default="available">
|
|
49
|
+
|
|
50
|
+
<EnumValues>
|
|
51
|
+
<Enum value="available">Ready to be adopted.</Enum>
|
|
52
|
+
<Enum value="pending">Adoption in progress.</Enum>
|
|
53
|
+
</EnumValues>
|
|
54
|
+
|
|
55
|
+
</ParamField>
|
|
56
|
+
|
|
57
|
+
## Returns
|
|
58
|
+
|
|
59
|
+
<ResponseField name="id" type="integer">
|
|
60
|
+
|
|
61
|
+
The unique id of the created pet.
|
|
62
|
+
|
|
63
|
+
</ResponseField>
|
|
64
|
+
|
|
65
|
+
<RequestExample title="cURL">
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
curl -X POST https://api.example.com/v1/pets -d '{ "name": "Rex" }'
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
</RequestExample>
|
|
72
|
+
|
|
73
|
+
<ResponseExample title="201 Created">
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{ "id": 10, "name": "Rex", "status": "available" }
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
</ResponseExample>
|
|
80
|
+
|
|
81
|
+
</Api>
|
|
82
|
+
````
|
|
83
|
+
|
|
84
|
+
A few things to know:
|
|
85
|
+
|
|
86
|
+
- The `method` in frontmatter is what shows as the colored badge in the sidebar.
|
|
87
|
+
- Headings (`## Body parameters`) become the section labels; the fields below
|
|
88
|
+
each heading line up with the example rail on the right.
|
|
89
|
+
- For a path parameter in braces, write it as an expression so Svelte does not
|
|
90
|
+
treat it as markup: `path={'/pets/{petId}'}`.
|
|
91
|
+
|
|
92
|
+
That page renders like the example below.
|
|
93
|
+
|
|
94
|
+
## Example
|
|
95
|
+
|
|
96
|
+
<Api>
|
|
97
|
+
|
|
98
|
+
<Endpoint method="POST" path="/pets" baseUrl="https://api.example.com/v1" />
|
|
99
|
+
|
|
100
|
+
## Body parameters
|
|
101
|
+
|
|
102
|
+
<ParamField name="name" type="string" required>
|
|
103
|
+
|
|
104
|
+
The pet's name.
|
|
105
|
+
|
|
106
|
+
</ParamField>
|
|
107
|
+
|
|
108
|
+
<ParamField name="status" type="string" default="available">
|
|
109
|
+
|
|
110
|
+
<EnumValues>
|
|
111
|
+
<Enum value="available">Ready to be adopted.</Enum>
|
|
112
|
+
<Enum value="pending">Adoption in progress.</Enum>
|
|
113
|
+
</EnumValues>
|
|
114
|
+
|
|
115
|
+
</ParamField>
|
|
116
|
+
|
|
117
|
+
## Returns
|
|
118
|
+
|
|
119
|
+
<ResponseField name="id" type="integer">
|
|
120
|
+
|
|
121
|
+
The unique id of the created pet.
|
|
122
|
+
|
|
123
|
+
</ResponseField>
|
|
124
|
+
|
|
125
|
+
<RequestExample title="cURL">
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
curl -X POST https://api.example.com/v1/pets -d '{ "name": "Rex" }'
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
</RequestExample>
|
|
132
|
+
|
|
133
|
+
<ResponseExample title="201 Created">
|
|
134
|
+
|
|
135
|
+
```json
|
|
136
|
+
{ "id": 10, "name": "Rex", "status": "available" }
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
</ResponseExample>
|
|
140
|
+
|
|
141
|
+
</Api>
|
|
142
|
+
|
|
143
|
+
## Components
|
|
144
|
+
|
|
145
|
+
| Component | Purpose |
|
|
146
|
+
| ------------------------------------ | -------------------------------------------------- |
|
|
147
|
+
| `Api` | Wraps a page so examples float into the right rail |
|
|
148
|
+
| `Endpoint` | The method + path header with a copy button |
|
|
149
|
+
| `ParamField` / `ResponseField` | A single parameter or response field |
|
|
150
|
+
| `RequestExample` / `ResponseExample` | A titled code example in the rail |
|
|
151
|
+
| `ObjectExample` | A titled object/schema example in the rail |
|
|
152
|
+
| `Expandable` | A collapsible group for nested fields |
|
|
153
|
+
| `EnumValues` / `Enum` | A list of allowed values for a field |
|
|
154
|
+
|
|
155
|
+
## Endpoint
|
|
156
|
+
|
|
157
|
+
| Prop | Type | Description |
|
|
158
|
+
| --------- | -------- | ------------------------------------------- |
|
|
159
|
+
| `method` | `string` | HTTP method (default `GET`) |
|
|
160
|
+
| `path` | `string` | Request path; `{param}` segments are styled |
|
|
161
|
+
| `baseUrl` | `string` | Base URL shown before the path |
|
|
162
|
+
|
|
163
|
+
Path parameters in braces need an expression so Svelte does not read them as
|
|
164
|
+
markup: `path={'/pets/{petId}'}`.
|
|
165
|
+
|
|
166
|
+
## ParamField and ResponseField
|
|
167
|
+
|
|
168
|
+
| Prop | Type | Description |
|
|
169
|
+
| ------------ | --------- | -------------------------------- |
|
|
170
|
+
| `name` | `string` | Field name (required) |
|
|
171
|
+
| `type` | `string` | Field type, for example `string` |
|
|
172
|
+
| `typeLink` | `string` | Link the type to another page |
|
|
173
|
+
| `required` | `boolean` | Mark the field required |
|
|
174
|
+
| `deprecated` | `boolean` | Mark the field deprecated |
|
|
175
|
+
| `default` | `string` | Default value |
|
|
176
|
+
|
|
177
|
+
The content between the tags is the field's description, and can hold nested
|
|
178
|
+
`Expandable` groups or an `EnumValues` list.
|
|
179
|
+
|
|
180
|
+
## Examples in the rail
|
|
181
|
+
|
|
182
|
+
`RequestExample`, `ResponseExample`, and `ObjectExample` each take an optional
|
|
183
|
+
`title` and render in the right-hand rail next to the fields they describe.
|
|
184
|
+
`Expandable` takes a `title` and an `open` boolean. `Enum` takes the allowed
|
|
185
|
+
`value`.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Badge
|
|
3
|
+
description: Small inline labels for status and tags.
|
|
4
|
+
icon: tag
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { Badge } from '$lib';
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
# Badge
|
|
12
|
+
|
|
13
|
+
A badge is a small pill you can drop inline to label something, a status, a
|
|
14
|
+
version, or a tag. It sits on the text baseline so it reads inside a sentence.
|
|
15
|
+
|
|
16
|
+
## Colors
|
|
17
|
+
|
|
18
|
+
Stripe is <Badge color="success">live</Badge>, billing is <Badge color="warn">in review</Badge>, and the old API is <Badge color="error">deprecated</Badge>. Use <Badge color="info">info</Badge> or the default <Badge>neutral</Badge> for everything else.
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```svelte
|
|
23
|
+
<script>
|
|
24
|
+
import { Badge } from '$lib';
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
The new endpoint is <Badge color="success">stable</Badge>.
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Props
|
|
31
|
+
|
|
32
|
+
| Prop | Type | Description |
|
|
33
|
+
| ------- | -------- | ------------------------------------------------ |
|
|
34
|
+
| `color` | `string` | `neutral`, `info`, `success`, `warn`, or `error` |
|