@axerity/cli 0.1.4 → 0.2.1
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/bin/axerity.js +70 -218
- package/dist/client/_app/immutable/assets/0.jCJXzoiy.css +1 -0
- package/dist/client/_app/immutable/assets/2.DZRzHaE1.css +1 -0
- package/dist/client/_app/immutable/assets/geist-cyrillic-ext-wght-normal.DjL33-gN.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-cyrillic-wght-normal.BEAKL7Jp.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-latin-ext-wght-normal.DC-KSUi6.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-latin-wght-normal.BgDaEnEv.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-mono-cyrillic-ext-wght-normal.I4S5GZfc.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-mono-cyrillic-wght-normal.BmXc_FBt.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-mono-latin-ext-wght-normal.DrnZ1wKl.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-mono-latin-wght-normal.B_7UjwxQ.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-mono-symbols2-wght-normal.GZpp1pK2.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-mono-vietnamese-wght-normal.D8KDMBhC.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-vietnamese-wght-normal.6IgcOCM7.woff2 +0 -0
- package/dist/client/_app/immutable/chunks/0CIKaoUA.js +139 -0
- package/dist/client/_app/immutable/chunks/0tC8Ubqr.js +2 -0
- package/dist/client/_app/immutable/chunks/29nvmPLe2.js +1 -0
- package/dist/client/_app/immutable/chunks/9IV9o0dV2.js +4 -0
- package/dist/client/_app/immutable/chunks/B-elEOLV.js +24 -0
- package/dist/client/_app/immutable/chunks/B1R9-4vu.js +89 -0
- package/dist/client/_app/immutable/chunks/B1eXHGII2.js +10 -0
- package/dist/client/_app/immutable/chunks/B2NKIbe62.js +206 -0
- package/dist/client/_app/immutable/chunks/B5Brrqz92.js +1 -0
- package/dist/client/_app/immutable/chunks/B6nymVS3.js +1 -0
- package/dist/client/_app/immutable/chunks/B8E5l9fg2.js +1 -0
- package/dist/client/_app/immutable/chunks/B8gBHxth2.js +1 -0
- package/dist/client/_app/immutable/chunks/BC8A8xkk.js +2 -0
- package/dist/client/_app/immutable/chunks/BGU5ZGjx.js +1 -0
- package/dist/client/_app/immutable/chunks/BLhBgXDr2.js +1 -0
- package/dist/client/_app/immutable/chunks/BNdlLOgu2.js +2 -0
- package/dist/client/_app/immutable/chunks/BQyPqLag.js +84 -0
- package/dist/client/_app/immutable/chunks/BRQspS80.js +162 -0
- package/dist/client/_app/immutable/chunks/BVz-DmJs2.js +132 -0
- package/dist/client/_app/immutable/chunks/BWPyau1x.js +1 -0
- package/dist/client/_app/immutable/chunks/BXD4L9Ly.js +9 -0
- package/dist/client/_app/immutable/chunks/B_Yg36qy2.js +1 -0
- package/dist/client/_app/immutable/chunks/BcuUc08l.js +292 -0
- package/dist/client/_app/immutable/chunks/BdsP84LY.js +231 -0
- package/dist/client/_app/immutable/chunks/Bie0X5s02.js +62 -0
- package/dist/client/_app/immutable/chunks/BifhSqXX.js +1 -0
- package/dist/client/_app/immutable/chunks/BjVjgMFk2.js +15 -0
- package/dist/client/_app/immutable/chunks/BpwmCo88.js +1 -0
- package/dist/client/_app/immutable/chunks/BxQVBtgJ.js +1 -0
- package/dist/client/_app/immutable/chunks/C2oEw9bf.js +34 -0
- package/dist/client/_app/immutable/chunks/C6Oj8XFW.js +1 -0
- package/dist/client/_app/immutable/chunks/C6v0vZRT2.js +36 -0
- package/dist/client/_app/immutable/chunks/C7H7uo1r.js +70 -0
- package/dist/client/_app/immutable/chunks/C8Fc0cco.js +1 -0
- package/dist/client/_app/immutable/chunks/CDfHwfr9.js +1 -0
- package/dist/client/_app/immutable/chunks/CEW3xh3M.js +124 -0
- package/dist/client/_app/immutable/chunks/CFNmf5NX.js +1 -0
- package/dist/client/_app/immutable/chunks/CGhzzHe4.js +1 -0
- package/dist/client/_app/immutable/chunks/CJMWL00f.js +1 -0
- package/dist/client/_app/immutable/chunks/CLrCY0qQ2.js +1 -0
- package/dist/client/_app/immutable/chunks/COu5VFF2.js +78 -0
- package/dist/client/_app/immutable/chunks/CSKSodPl2.js +1 -0
- package/dist/client/_app/immutable/chunks/CVNFCEpi.js +1 -0
- package/dist/client/_app/immutable/chunks/CWUJwgR2.js +1 -0
- package/dist/client/_app/immutable/chunks/CXC42hVj.js +70 -0
- package/dist/client/_app/immutable/chunks/CZqBFf11.js +30 -0
- package/dist/client/_app/immutable/chunks/CaWcga612.js +1 -0
- package/dist/client/_app/immutable/chunks/CcX7Oofq.js +1 -0
- package/dist/client/_app/immutable/chunks/Chn8RaCU2.js +1 -0
- package/dist/client/_app/immutable/chunks/CtmfIXf-.js +161 -0
- package/dist/client/_app/immutable/chunks/D0Co2O6p.js +7 -0
- package/dist/client/_app/immutable/chunks/D1O9pT8r.js +1 -0
- package/dist/client/_app/immutable/chunks/D1z0eUZA.js +3 -0
- package/dist/client/_app/immutable/chunks/D5KVydqU.js +1 -0
- package/dist/client/_app/immutable/chunks/D6jRqBbL.js +1 -0
- package/dist/client/_app/immutable/chunks/DDXR3Aw12.js +1 -0
- package/dist/client/_app/immutable/chunks/DG5yTEkY.js +1 -0
- package/dist/client/_app/immutable/chunks/DGHybmkM2.js +1 -0
- package/dist/client/_app/immutable/chunks/DITdNjTm.js +7 -0
- package/dist/client/_app/immutable/chunks/D_nZbl6c.js +162 -0
- package/dist/client/_app/immutable/chunks/Dg6QheNk.js +85 -0
- package/dist/client/_app/immutable/chunks/Dn1BfjD4.js +1 -0
- package/dist/client/_app/immutable/chunks/DpEnPnBc.js +1 -0
- package/dist/client/_app/immutable/chunks/Drl36yuV.js +40 -0
- package/dist/client/_app/immutable/chunks/Dt_5ZQE2.js +1 -0
- package/dist/client/_app/immutable/chunks/ED9-GWAc2.js +10 -0
- package/dist/client/_app/immutable/chunks/FqbQrHcz2.js +321 -0
- package/dist/client/_app/immutable/chunks/O1MNaiG9.js +3 -0
- package/dist/client/_app/immutable/chunks/PLsDE8Xa.js +24 -0
- package/dist/client/_app/immutable/chunks/PwGqCEPd.js +106 -0
- package/dist/client/_app/immutable/chunks/QmWylQL4.js +96 -0
- package/dist/client/_app/immutable/chunks/SbORYBuH.js +1 -0
- package/dist/client/_app/immutable/chunks/Vhh-h91d.js +257 -0
- package/dist/client/_app/immutable/chunks/Y3d8lUBM.js +120 -0
- package/dist/client/_app/immutable/chunks/aheLp5ES.js +32 -0
- package/dist/client/_app/immutable/chunks/dcFrWhgf.js +1 -0
- package/dist/client/_app/immutable/chunks/dqbyyLvi2.js +10 -0
- package/dist/client/_app/immutable/chunks/hFfQmBrk2.js +1 -0
- package/dist/client/_app/immutable/chunks/mktnrgVa.js +1 -0
- package/dist/client/_app/immutable/chunks/qD2cSsUD2.js +1 -0
- package/dist/client/_app/immutable/chunks/v-V-aVm52.js +43 -0
- package/dist/client/_app/immutable/chunks/wCc4pE4l.js +3 -0
- package/dist/client/_app/immutable/chunks/xihTtKlq.js +1 -0
- package/dist/client/_app/immutable/entry/app.D6KBNU0y.js +2 -0
- package/dist/client/_app/immutable/entry/start.CQdeQUt-.js +1 -0
- package/dist/client/_app/immutable/nodes/0.DBZ13WOO.js +1 -0
- package/dist/client/_app/immutable/nodes/1.B_AZbN4M.js +1 -0
- package/dist/client/_app/immutable/nodes/2.OqcLisIf.js +28 -0
- package/dist/client/_app/version.json +1 -0
- package/dist/env.js +94 -0
- package/dist/handler.js +1494 -0
- package/dist/index.js +345 -0
- package/dist/server/chunks/0-oTZ8HCk-.js +40 -0
- package/dist/server/chunks/0-oTZ8HCk-.js.map +1 -0
- package/dist/server/chunks/1-nu6YvZRQ.js +9 -0
- package/dist/server/chunks/1-nu6YvZRQ.js.map +1 -0
- package/dist/server/chunks/2-YpqcBGyH.js +54 -0
- package/dist/server/chunks/2-YpqcBGyH.js.map +1 -0
- package/dist/server/chunks/Icon-D37LtZZG.js +186 -0
- package/dist/server/chunks/Icon-D37LtZZG.js.map +1 -0
- package/dist/server/chunks/_error.svelte-NKP81ks-.js +48 -0
- package/dist/server/chunks/_error.svelte-NKP81ks-.js.map +1 -0
- package/dist/server/chunks/_layout.svelte-2Eq-_AqW.js +31 -0
- package/dist/server/chunks/_layout.svelte-2Eq-_AqW.js.map +1 -0
- package/dist/server/chunks/_page.svelte-Chjw6C-d.js +2206 -0
- package/dist/server/chunks/_page.svelte-Chjw6C-d.js.map +1 -0
- package/dist/server/chunks/_server.ts-5K31OG2_.js +31 -0
- package/dist/server/chunks/_server.ts-5K31OG2_.js.map +1 -0
- package/dist/server/chunks/_server.ts-BRaXDyO1.js +29 -0
- package/dist/server/chunks/_server.ts-BRaXDyO1.js.map +1 -0
- package/dist/server/chunks/_server.ts-BuDGLKUC.js +213 -0
- package/dist/server/chunks/_server.ts-BuDGLKUC.js.map +1 -0
- package/dist/server/chunks/_server.ts-Bx1daJ1-.js +53 -0
- package/dist/server/chunks/_server.ts-Bx1daJ1-.js.map +1 -0
- package/dist/server/chunks/_server.ts-By7FRFNB.js +37 -0
- package/dist/server/chunks/_server.ts-By7FRFNB.js.map +1 -0
- package/dist/server/chunks/_server.ts-DIxsjlQ0.js +32 -0
- package/dist/server/chunks/_server.ts-DIxsjlQ0.js.map +1 -0
- package/dist/server/chunks/_server.ts-Dgpc__Yz.js +41 -0
- package/dist/server/chunks/_server.ts-Dgpc__Yz.js.map +1 -0
- package/dist/server/chunks/_server.ts-kWOJv5IZ.js +26 -0
- package/dist/server/chunks/_server.ts-kWOJv5IZ.js.map +1 -0
- package/dist/server/chunks/content-store-DV5Rlfo3.js +5252 -0
- package/dist/server/chunks/content-store-DV5Rlfo3.js.map +1 -0
- package/dist/server/chunks/docpage-BkHysAhp.js +5 -0
- package/dist/server/chunks/docpage-BkHysAhp.js.map +1 -0
- package/dist/server/chunks/exports-C0PApeP1.js +758 -0
- package/dist/server/chunks/exports-C0PApeP1.js.map +1 -0
- package/dist/server/chunks/hooks.server-BnfZljxX.js +42 -0
- package/dist/server/chunks/hooks.server-BnfZljxX.js.map +1 -0
- package/dist/server/chunks/internal-pc3wKdix.js +5374 -0
- package/dist/server/chunks/internal-pc3wKdix.js.map +1 -0
- package/dist/server/chunks/mdfile-DBiwGtNY.js +5 -0
- package/dist/server/chunks/mdfile-DBiwGtNY.js.map +1 -0
- package/dist/server/chunks/site-CmugjRXT.js +57 -0
- package/dist/server/chunks/site-CmugjRXT.js.map +1 -0
- package/dist/server/index.js +4356 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/manifest.js +103 -0
- package/dist/server/manifest.js.map +1 -0
- package/dist/shims.js +32 -0
- package/package.json +24 -16
- package/runtime/crawl.js +58 -0
- package/runtime/preview.js +42 -0
- package/runtime/serve.js +78 -0
- package/runtime/static.js +76 -0
- package/mdsvex.config.js +0 -261
- package/scripts/prepare-engine.mjs +0 -20
- package/src/app.d.ts +0 -17
- package/src/app.html +0 -39
- package/src/content/demo/api/meta.json +0 -5
- package/src/content/demo/api/pet/add-pet.md +0 -105
- package/src/content/demo/api/pet/delete-pet.md +0 -70
- package/src/content/demo/api/pet/find-by-status.md +0 -72
- package/src/content/demo/api/pet/find-by-tags.md +0 -64
- package/src/content/demo/api/pet/get-pet.md +0 -99
- package/src/content/demo/api/pet/meta.json +0 -15
- package/src/content/demo/api/pet/pet-object.md +0 -112
- package/src/content/demo/api/pet/update-pet-with-form.md +0 -69
- package/src/content/demo/api/pet/update-pet.md +0 -79
- package/src/content/demo/api/pet/upload-image.md +0 -79
- package/src/content/demo/api/store/delete-order.md +0 -62
- package/src/content/demo/api/store/get-order.md +0 -70
- package/src/content/demo/api/store/inventory.md +0 -54
- package/src/content/demo/api/store/meta.json +0 -5
- package/src/content/demo/api/store/order-object.md +0 -77
- package/src/content/demo/api/store/place-order.md +0 -83
- package/src/content/demo/api/user/create-user.md +0 -69
- package/src/content/demo/api/user/create-with-list.md +0 -57
- package/src/content/demo/api/user/delete-user.md +0 -61
- package/src/content/demo/api/user/get-user.md +0 -69
- package/src/content/demo/api/user/login.md +0 -80
- package/src/content/demo/api/user/logout.md +0 -45
- package/src/content/demo/api/user/meta.json +0 -14
- package/src/content/demo/api/user/update-user.md +0 -69
- package/src/content/demo/api/user/user-object.md +0 -85
- package/src/content/demo/changelog.md +0 -44
- package/src/content/demo/components/accordion.md +0 -70
- package/src/content/demo/components/api.md +0 -185
- package/src/content/demo/components/badge.md +0 -34
- package/src/content/demo/components/callout.md +0 -83
- package/src/content/demo/components/cards.md +0 -88
- package/src/content/demo/components/code-group.md +0 -55
- package/src/content/demo/components/columns.md +0 -42
- package/src/content/demo/components/frame.md +0 -51
- package/src/content/demo/components/icon.md +0 -54
- package/src/content/demo/components/kbd.md +0 -28
- package/src/content/demo/components/meta.json +0 -26
- package/src/content/demo/components/roadmap.md +0 -86
- package/src/content/demo/components/steps.md +0 -72
- package/src/content/demo/components/tabs.md +0 -146
- package/src/content/demo/components/tooltip.md +0 -44
- package/src/content/demo/components/tree.md +0 -83
- package/src/content/demo/components/type-table.md +0 -77
- package/src/content/demo/components/update.md +0 -48
- package/src/content/demo/components/video.md +0 -56
- package/src/content/demo/components/webhooks.md +0 -109
- package/src/content/demo/components/websockets.md +0 -101
- package/src/content/demo/configuration/ai.md +0 -40
- package/src/content/demo/configuration/cli.md +0 -48
- package/src/content/demo/configuration/deployment.md +0 -105
- package/src/content/demo/configuration/index.md +0 -92
- package/src/content/demo/configuration/layouts.md +0 -51
- package/src/content/demo/configuration/meta.json +0 -5
- package/src/content/demo/configuration/navigation.md +0 -167
- package/src/content/demo/configuration/openapi.md +0 -103
- package/src/content/demo/configuration/search.md +0 -36
- package/src/content/demo/index.md +0 -59
- package/src/content/demo/installation.md +0 -66
- package/src/content/demo/meta.json +0 -15
- package/src/content/demo/quick-start.md +0 -47
- package/src/content/demo/theming/advanced.md +0 -116
- package/src/content/demo/theming/code.md +0 -66
- package/src/content/demo/theming/colors.md +0 -103
- package/src/content/demo/theming/index.md +0 -88
- package/src/content/demo/theming/layout.md +0 -71
- package/src/content/demo/theming/meta.json +0 -5
- package/src/content/demo/theming/themes.md +0 -99
- package/src/content/demo/theming/typography.md +0 -83
- package/src/content/demo/writing/code-blocks.md +0 -154
- package/src/content/demo/writing/diagrams.md +0 -44
- package/src/content/demo/writing/frontmatter.md +0 -33
- package/src/content/demo/writing/markdown.md +0 -62
- package/src/content/demo/writing/meta.json +0 -5
- package/src/hooks.server.ts +0 -49
- package/src/lib/assets/favicon.svg +0 -1
- package/src/lib/base.ts +0 -12
- package/src/lib/components/DynamicIcon.svelte +0 -41
- package/src/lib/components/docs/Analytics.svelte +0 -38
- package/src/lib/components/docs/Banner.svelte +0 -44
- package/src/lib/components/docs/Breadcrumbs.svelte +0 -38
- package/src/lib/components/docs/CopyPageMenu.svelte +0 -119
- package/src/lib/components/docs/DocsLayout.svelte +0 -192
- package/src/lib/components/docs/Footer.svelte +0 -60
- package/src/lib/components/docs/Mermaid.svelte +0 -39
- package/src/lib/components/docs/Navbar.svelte +0 -144
- package/src/lib/components/docs/PageMeta.svelte +0 -35
- package/src/lib/components/docs/PageNav.svelte +0 -44
- package/src/lib/components/docs/SearchDialog.svelte +0 -182
- package/src/lib/components/docs/Sidebar.svelte +0 -85
- package/src/lib/components/docs/SidebarDropdown.svelte +0 -56
- package/src/lib/components/docs/SidebarFooterLinks.svelte +0 -19
- package/src/lib/components/docs/SidebarGroup.svelte +0 -54
- package/src/lib/components/docs/SidebarLink.svelte +0 -67
- package/src/lib/components/docs/TableOfContents.svelte +0 -77
- package/src/lib/components/docs/ThemeToggle.svelte +0 -19
- package/src/lib/components/docs/VersionSwitcher.svelte +0 -80
- package/src/lib/components/kit/Accordion.svelte +0 -60
- package/src/lib/components/kit/AccordionGroup.svelte +0 -13
- package/src/lib/components/kit/Badge.svelte +0 -32
- package/src/lib/components/kit/Callout.svelte +0 -51
- package/src/lib/components/kit/Card.svelte +0 -72
- package/src/lib/components/kit/CardGroup.svelte +0 -21
- package/src/lib/components/kit/CodeGroup.svelte +0 -65
- package/src/lib/components/kit/Columns.svelte +0 -26
- package/src/lib/components/kit/Event.svelte +0 -23
- package/src/lib/components/kit/EventList.svelte +0 -9
- package/src/lib/components/kit/File.svelte +0 -15
- package/src/lib/components/kit/Folder.svelte +0 -46
- package/src/lib/components/kit/Frame.svelte +0 -81
- package/src/lib/components/kit/Icon.svelte +0 -17
- package/src/lib/components/kit/Kbd.svelte +0 -11
- package/src/lib/components/kit/Roadmap.svelte +0 -15
- package/src/lib/components/kit/RoadmapItem.svelte +0 -109
- package/src/lib/components/kit/Step.svelte +0 -63
- package/src/lib/components/kit/Steps.svelte +0 -16
- package/src/lib/components/kit/Tab.svelte +0 -27
- package/src/lib/components/kit/Tabs.svelte +0 -75
- package/src/lib/components/kit/Tooltip.svelte +0 -33
- package/src/lib/components/kit/Tree.svelte +0 -11
- package/src/lib/components/kit/TypeTable.svelte +0 -187
- package/src/lib/components/kit/Update.svelte +0 -32
- package/src/lib/components/kit/Video.svelte +0 -64
- package/src/lib/components/kit/accordion-context.ts +0 -1
- package/src/lib/components/kit/api/Api.svelte +0 -80
- package/src/lib/components/kit/api/ApiExamplePanel.svelte +0 -100
- package/src/lib/components/kit/api/ApiField.svelte +0 -124
- package/src/lib/components/kit/api/Channel.svelte +0 -121
- package/src/lib/components/kit/api/Endpoint.svelte +0 -116
- package/src/lib/components/kit/api/Enum.svelte +0 -44
- package/src/lib/components/kit/api/EnumValues.svelte +0 -35
- package/src/lib/components/kit/api/Expandable.svelte +0 -70
- package/src/lib/components/kit/api/Message.svelte +0 -67
- package/src/lib/components/kit/api/ObjectExample.svelte +0 -11
- package/src/lib/components/kit/api/RequestExample.svelte +0 -11
- package/src/lib/components/kit/api/ResponseExample.svelte +0 -11
- package/src/lib/components/kit/api/Webhook.svelte +0 -115
- package/src/lib/components/kit/api/api-context.ts +0 -15
- package/src/lib/components/kit/tabs-context.ts +0 -8
- package/src/lib/components/kit/tabs-store.svelte.ts +0 -28
- package/src/lib/config/site.ts +0 -34
- package/src/lib/content/index.ts +0 -50
- package/src/lib/content/raw.ts +0 -21
- package/src/lib/content/tree.ts +0 -169
- package/src/lib/index.ts +0 -79
- package/src/lib/nav-match.ts +0 -23
- package/src/lib/openapi/generate.ts +0 -629
- package/src/lib/server/og.ts +0 -140
- package/src/lib/state/search.svelte.ts +0 -9
- package/src/lib/state/theme.svelte.ts +0 -58
- package/src/lib/types.ts +0 -216
- package/src/params/docpage.ts +0 -3
- package/src/params/mdfile.ts +0 -3
- package/src/routes/+error.svelte +0 -46
- package/src/routes/+layout.svelte +0 -25
- package/src/routes/[...path=mdfile]/+server.ts +0 -21
- package/src/routes/[...slug=docpage]/+page.svelte +0 -63
- package/src/routes/[...slug=docpage]/+page.ts +0 -44
- package/src/routes/layout.css +0 -897
- package/src/routes/llms-full.txt/+server.ts +0 -22
- package/src/routes/llms.txt/+server.ts +0 -20
- package/src/routes/og/[...slug]/+server.ts +0 -77
- package/src/routes/rss.xml/+server.ts +0 -65
- package/src/routes/search.json/+server.ts +0 -54
- package/src/routes/sitemap.xml/+server.ts +0 -21
- package/svelte.config.js +0 -35
- package/tsconfig.json +0 -20
- package/vite.config.ts +0 -67
- /package/{static → dist/client}/favicon-dark.svg +0 -0
- /package/{static → dist/client}/favicon-light.svg +0 -0
- /package/{static → dist/client}/favicon.svg +0 -0
- /package/{static → dist/client}/fonts/geist-400.ttf +0 -0
- /package/{static → dist/client}/fonts/geist-600.ttf +0 -0
- /package/{static → dist/client}/fonts/geist-700.ttf +0 -0
- /package/{static → dist/client}/og-image.png +0 -0
- /package/{static → dist/client}/robots.txt +0 -0
package/mdsvex.config.js
DELETED
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from 'node:fs';
|
|
2
|
-
import { defineMDSveXConfig } from 'mdsvex';
|
|
3
|
-
import { escapeSvelte } from 'mdsvex';
|
|
4
|
-
import rehypeSlug from 'rehype-slug';
|
|
5
|
-
import { createHighlighter } from 'shiki';
|
|
6
|
-
import { transformerTwoslash } from '@shikijs/twoslash';
|
|
7
|
-
|
|
8
|
-
let basePath = '';
|
|
9
|
-
try {
|
|
10
|
-
basePath = JSON.parse(readFileSync('./axerity.json', 'utf8')).basePath ?? '';
|
|
11
|
-
} catch {
|
|
12
|
-
// no config
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function rehypeBasePath() {
|
|
16
|
-
return (tree) => {
|
|
17
|
-
const walk = (node) => {
|
|
18
|
-
if (node.type === 'element' && node.tagName === 'a') {
|
|
19
|
-
const href = node.properties?.href;
|
|
20
|
-
if (
|
|
21
|
-
typeof href === 'string' &&
|
|
22
|
-
href.startsWith('/') &&
|
|
23
|
-
!href.startsWith('//') &&
|
|
24
|
-
!href.startsWith(`${basePath}/`)
|
|
25
|
-
) {
|
|
26
|
-
node.properties.href = basePath + href;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
node.children?.forEach(walk);
|
|
30
|
-
};
|
|
31
|
-
if (basePath) walk(tree);
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Wrap every `<table>` in a `<div class="table-wrapper">` so it can be a rounded,
|
|
37
|
-
* horizontally-scrollable card (a bare table can't clip rounded corners while
|
|
38
|
-
* also scrolling on overflow).
|
|
39
|
-
*/
|
|
40
|
-
function rehypeTableWrapper() {
|
|
41
|
-
return (tree) => {
|
|
42
|
-
const walk = (node) => {
|
|
43
|
-
if (!node.children) return;
|
|
44
|
-
node.children = node.children.map((child) => {
|
|
45
|
-
if (child.type === 'element' && child.tagName === 'table') {
|
|
46
|
-
return {
|
|
47
|
-
type: 'element',
|
|
48
|
-
tagName: 'div',
|
|
49
|
-
properties: { className: ['table-wrapper'] },
|
|
50
|
-
children: [child]
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
walk(child);
|
|
54
|
-
return child;
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
walk(tree);
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function rehypeExternalLinks() {
|
|
62
|
-
return (tree) => {
|
|
63
|
-
const walk = (node) => {
|
|
64
|
-
if (node.type === 'element' && node.tagName === 'a') {
|
|
65
|
-
const href = node.properties?.href;
|
|
66
|
-
if (typeof href === 'string' && /^https?:\/\//.test(href)) {
|
|
67
|
-
node.properties.target = '_blank';
|
|
68
|
-
node.properties.rel = 'noreferrer noopener';
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
node.children?.forEach(walk);
|
|
72
|
-
};
|
|
73
|
-
walk(tree);
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// Dual theme: light tokens are inlined, dark tokens exposed as CSS vars that
|
|
78
|
-
// `layout.css` switches on under `.dark`.
|
|
79
|
-
const themes = { light: 'github-light', dark: 'vesper' };
|
|
80
|
-
|
|
81
|
-
// Languages preloaded into the highlighter. Anything else falls back to plain
|
|
82
|
-
// text (see the try/catch below).
|
|
83
|
-
const langs = [
|
|
84
|
-
'svelte',
|
|
85
|
-
'typescript',
|
|
86
|
-
'javascript',
|
|
87
|
-
'json',
|
|
88
|
-
'yaml',
|
|
89
|
-
'bash',
|
|
90
|
-
'shell',
|
|
91
|
-
'html',
|
|
92
|
-
'css',
|
|
93
|
-
'markdown'
|
|
94
|
-
];
|
|
95
|
-
|
|
96
|
-
// Lazily create a single shared highlighter (loading grammars + themes is
|
|
97
|
-
// expensive, so do it once).
|
|
98
|
-
let highlighterPromise;
|
|
99
|
-
function getHighlighter() {
|
|
100
|
-
if (!highlighterPromise) {
|
|
101
|
-
highlighterPromise = createHighlighter({ themes: Object.values(themes), langs });
|
|
102
|
-
}
|
|
103
|
-
return highlighterPromise;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/** Escape HTML special chars for safe interpolation into the title bar. */
|
|
107
|
-
function escapeHtml(str) {
|
|
108
|
-
return str
|
|
109
|
-
.replace(/&/g, '&')
|
|
110
|
-
.replace(/</g, '<')
|
|
111
|
-
.replace(/>/g, '>')
|
|
112
|
-
.replace(/"/g, '"');
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/** Pull `title="…"` (or single-quoted) out of a fence's meta string. */
|
|
116
|
-
function parseTitle(meta) {
|
|
117
|
-
const match = meta.match(/title=(?:"([^"]*)"|'([^']*)')/);
|
|
118
|
-
return match ? (match[1] ?? match[2]) : null;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Parse a `{1,3-5}` line-range expression from a fence's meta into a Set of
|
|
123
|
-
* 1-based line numbers to highlight.
|
|
124
|
-
*/
|
|
125
|
-
function parseHighlightLines(meta) {
|
|
126
|
-
const match = meta.match(/\{([\d,\s-]+)\}/);
|
|
127
|
-
const lines = new Set();
|
|
128
|
-
if (!match) return lines;
|
|
129
|
-
for (const part of match[1].split(',')) {
|
|
130
|
-
const range = part.trim();
|
|
131
|
-
if (!range) continue;
|
|
132
|
-
const [start, end] = range.split('-').map((n) => parseInt(n, 10));
|
|
133
|
-
for (let i = start; i <= (end ?? start); i++) lines.add(i);
|
|
134
|
-
}
|
|
135
|
-
return lines;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/** Whether the fence asked for line numbers (```ts showLineNumbers). */
|
|
139
|
-
function hasLineNumbers(meta) {
|
|
140
|
-
return /\bshowLineNumbers\b/.test(meta);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/** Whether the fence asked for Twoslash type annotations (```ts twoslash). */
|
|
144
|
-
function hasTwoslash(meta) {
|
|
145
|
-
return /\btwoslash\b/.test(meta);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
const twoslash = transformerTwoslash({ explicitTrigger: true });
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* The YAML grammar gives the `---` document markers no scope, so they inherit
|
|
152
|
-
* the bright default foreground and read as unhighlighted. Dim them to a subtle
|
|
153
|
-
* token that adapts to both themes.
|
|
154
|
-
*/
|
|
155
|
-
function transformerDimYamlMarkers() {
|
|
156
|
-
return {
|
|
157
|
-
name: 'axerity:dim-yaml-markers',
|
|
158
|
-
span(node) {
|
|
159
|
-
const text = node.children?.[0];
|
|
160
|
-
if (text && text.type === 'text' && text.value.trim() === '---') {
|
|
161
|
-
node.properties = { ...node.properties, style: 'color:var(--fg-subtle)' };
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/** Shiki transformer: tag the requested lines with a `highlighted` class. */
|
|
168
|
-
function transformerHighlightLines(lines) {
|
|
169
|
-
return {
|
|
170
|
-
name: 'axerity:highlight-lines',
|
|
171
|
-
line(node, lineNumber) {
|
|
172
|
-
if (lines.has(lineNumber)) this.addClassToHast(node, 'highlighted');
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Shiki separates lines with literal "\n" text nodes. With block-level lines
|
|
179
|
-
* (needed for full-width highlights) those render as blank lines, so strip
|
|
180
|
-
* them — the copy handler rejoins lines with newlines itself.
|
|
181
|
-
*/
|
|
182
|
-
function transformerRemoveLineBreaks() {
|
|
183
|
-
return {
|
|
184
|
-
name: 'axerity:remove-line-breaks',
|
|
185
|
-
code(node) {
|
|
186
|
-
node.children = node.children.filter(
|
|
187
|
-
(child) => !(child.type === 'text' && child.value === '\n')
|
|
188
|
-
);
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/** Shiki transformer: flag the block so CSS counters can number the lines. */
|
|
194
|
-
function transformerLineNumbers() {
|
|
195
|
-
return {
|
|
196
|
-
name: 'axerity:line-numbers',
|
|
197
|
-
pre(node) {
|
|
198
|
-
this.addClassToHast(node, 'has-line-numbers');
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// Static copy button injected into every code block; clicks are handled by a
|
|
204
|
-
// delegated listener in DocsLayout (the markup carries no state itself).
|
|
205
|
-
const COPY_BUTTON =
|
|
206
|
-
'<button class="copy-button" type="button" aria-label="Copy code">' +
|
|
207
|
-
'<svg class="icon-copy" xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>' +
|
|
208
|
-
'<svg class="icon-check" xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>' +
|
|
209
|
-
'</button>';
|
|
210
|
-
|
|
211
|
-
export default defineMDSveXConfig({
|
|
212
|
-
extensions: ['.svx', '.md'],
|
|
213
|
-
// Give every heading a stable id so the TOC can anchor + scroll-spy to it.
|
|
214
|
-
rehypePlugins: [rehypeSlug, rehypeTableWrapper, rehypeExternalLinks, rehypeBasePath],
|
|
215
|
-
highlight: {
|
|
216
|
-
highlighter: async (code, lang, meta) => {
|
|
217
|
-
if (lang === 'mermaid') {
|
|
218
|
-
const graph = escapeSvelte(
|
|
219
|
-
code.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')
|
|
220
|
-
);
|
|
221
|
-
return `{@html \`<pre class="mermaid">${graph}</pre>\`}`;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
const highlighter = await getHighlighter();
|
|
225
|
-
const language = (lang && highlighter.getLoadedLanguages().includes(lang) && lang) || 'text';
|
|
226
|
-
meta = meta || '';
|
|
227
|
-
|
|
228
|
-
const title = parseTitle(meta);
|
|
229
|
-
const highlightLines = parseHighlightLines(meta);
|
|
230
|
-
const twoslashEnabled = hasTwoslash(meta);
|
|
231
|
-
|
|
232
|
-
const transformers = [];
|
|
233
|
-
if (twoslashEnabled) transformers.push(twoslash);
|
|
234
|
-
if (language === 'yaml') transformers.push(transformerDimYamlMarkers());
|
|
235
|
-
transformers.push(transformerRemoveLineBreaks());
|
|
236
|
-
if (highlightLines.size) transformers.push(transformerHighlightLines(highlightLines));
|
|
237
|
-
if (hasLineNumbers(meta)) transformers.push(transformerLineNumbers());
|
|
238
|
-
|
|
239
|
-
const html = highlighter.codeToHtml(code, {
|
|
240
|
-
lang: language,
|
|
241
|
-
meta: { __raw: meta },
|
|
242
|
-
themes,
|
|
243
|
-
defaultColor: 'light',
|
|
244
|
-
transformers
|
|
245
|
-
});
|
|
246
|
-
|
|
247
|
-
// With a title, the copy button lives in the header bar; otherwise it
|
|
248
|
-
// floats in the top-right corner of the block.
|
|
249
|
-
const header = title
|
|
250
|
-
? `<div class="code-header"><span class="code-title">${escapeHtml(title)}</span>${COPY_BUTTON}</div>`
|
|
251
|
-
: '';
|
|
252
|
-
const blockClass =
|
|
253
|
-
(title ? 'code-block has-header' : 'code-block') + (twoslashEnabled ? ' has-twoslash' : '');
|
|
254
|
-
const floatingButton = title ? '' : COPY_BUTTON;
|
|
255
|
-
const wrapped = `<div class="${blockClass}">${header}${floatingButton}${html}</div>`;
|
|
256
|
-
|
|
257
|
-
// Escape so Svelte doesn't try to parse `{`, `}`, or backticks in the code.
|
|
258
|
-
return `{@html \`${escapeSvelte(wrapped)}\`}`;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { cpSync, existsSync, mkdirSync, readdirSync, rmSync, symlinkSync } from 'node:fs';
|
|
3
|
-
import { dirname, join, resolve } from 'node:path';
|
|
4
|
-
import { fileURLToPath } from 'node:url';
|
|
5
|
-
|
|
6
|
-
const root = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
|
7
|
-
const symlinkType = process.platform === 'win32' ? 'junction' : 'dir';
|
|
8
|
-
|
|
9
|
-
const demo = join(root, 'src', 'content', 'demo');
|
|
10
|
-
const docs = join(root, 'src', 'content', 'docs');
|
|
11
|
-
const defaultConfig = join(root, 'axerity.default.json');
|
|
12
|
-
const config = join(root, 'axerity.json');
|
|
13
|
-
|
|
14
|
-
rmSync(docs, { recursive: true, force: true });
|
|
15
|
-
mkdirSync(docs, { recursive: true });
|
|
16
|
-
for (const entry of readdirSync(demo)) {
|
|
17
|
-
symlinkSync(join(demo, entry), join(docs, entry), symlinkType);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
if (existsSync(defaultConfig)) cpSync(defaultConfig, config);
|
package/src/app.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// See https://svelte.dev/docs/kit/types#app.d.ts
|
|
2
|
-
// for information about these interfaces
|
|
3
|
-
declare global {
|
|
4
|
-
namespace App {
|
|
5
|
-
// interface Error {}
|
|
6
|
-
// interface Locals {}
|
|
7
|
-
// interface PageData {}
|
|
8
|
-
// interface PageState {}
|
|
9
|
-
// interface Platform {}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// Fontsource ships CSS without type declarations; declare the side-effect imports.
|
|
14
|
-
declare module '@fontsource-variable/geist/*';
|
|
15
|
-
declare module '@fontsource-variable/geist-mono/*';
|
|
16
|
-
|
|
17
|
-
export {};
|
package/src/app.html
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<meta name="text-scale" content="scale" />
|
|
7
|
-
<script>
|
|
8
|
-
(() => {
|
|
9
|
-
try {
|
|
10
|
-
const pref = localStorage.getItem('axerity-theme') ?? 'dark';
|
|
11
|
-
const dark =
|
|
12
|
-
pref === 'dark' ||
|
|
13
|
-
(pref === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches);
|
|
14
|
-
document.documentElement.classList.toggle('dark', dark);
|
|
15
|
-
} catch {}
|
|
16
|
-
})();
|
|
17
|
-
(() => {
|
|
18
|
-
try {
|
|
19
|
-
const hide = [];
|
|
20
|
-
for (let i = 0; i < localStorage.length; i++) {
|
|
21
|
-
const key = localStorage.key(i);
|
|
22
|
-
if (key && key.indexOf('axerity-banner:') === 0 && localStorage.getItem(key) === '1') {
|
|
23
|
-
hide.push('[data-banner-key="' + key.replace(/"/g, '\\"') + '"]');
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
if (hide.length) {
|
|
27
|
-
const style = document.createElement('style');
|
|
28
|
-
style.textContent = hide.join(',') + '{display:none!important}';
|
|
29
|
-
document.head.appendChild(style);
|
|
30
|
-
}
|
|
31
|
-
} catch {}
|
|
32
|
-
})();
|
|
33
|
-
</script>
|
|
34
|
-
%sveltekit.head%
|
|
35
|
-
</head>
|
|
36
|
-
<body data-sveltekit-preload-data="hover">
|
|
37
|
-
<div style="display: contents">%sveltekit.body%</div>
|
|
38
|
-
</body>
|
|
39
|
-
</html>
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Add a new pet
|
|
3
|
-
description: Add a new pet to the store.
|
|
4
|
-
icon: paw-print
|
|
5
|
-
layout: api
|
|
6
|
-
method: POST
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
<script>
|
|
10
|
-
import { Api, Endpoint, ParamField, ResponseField, RequestExample, ResponseExample, ObjectExample } from '$lib';
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
# Add a new pet
|
|
14
|
-
|
|
15
|
-
Add a new pet to the store.
|
|
16
|
-
|
|
17
|
-
<Api>
|
|
18
|
-
|
|
19
|
-
<Endpoint method="POST" path="/pet" baseUrl="https://petstore3.swagger.io/api/v3" />
|
|
20
|
-
|
|
21
|
-
## Body parameters
|
|
22
|
-
|
|
23
|
-
Create a new pet in the store.
|
|
24
|
-
|
|
25
|
-
<ParamField name="name" type="string" required>
|
|
26
|
-
|
|
27
|
-
The pet's name.
|
|
28
|
-
|
|
29
|
-
</ParamField>
|
|
30
|
-
|
|
31
|
-
<ParamField name="photoUrls" type="array of strings" required>
|
|
32
|
-
|
|
33
|
-
URLs of the pet's photos.
|
|
34
|
-
|
|
35
|
-
</ParamField>
|
|
36
|
-
|
|
37
|
-
<ParamField name="category" type="Category" typeLink="/api/pet/pet-object">
|
|
38
|
-
|
|
39
|
-
The category this pet belongs to.
|
|
40
|
-
|
|
41
|
-
</ParamField>
|
|
42
|
-
|
|
43
|
-
<ParamField name="status" type="enum">
|
|
44
|
-
|
|
45
|
-
Pet status in the store. One of `available`, `pending`, or `sold`.
|
|
46
|
-
|
|
47
|
-
</ParamField>
|
|
48
|
-
|
|
49
|
-
## Returns
|
|
50
|
-
|
|
51
|
-
Returns the created [Pet](/api/pet/pet-object).
|
|
52
|
-
|
|
53
|
-
<ResponseField name="id" type="integer">
|
|
54
|
-
|
|
55
|
-
Unique id for the new pet.
|
|
56
|
-
|
|
57
|
-
</ResponseField>
|
|
58
|
-
|
|
59
|
-
<RequestExample title="cURL">
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
curl https://petstore3.swagger.io/api/v3/pet \
|
|
63
|
-
-H "Content-Type: application/json" \
|
|
64
|
-
-d '{ "name": "doggie", "photoUrls": ["https://example.com/doggie.png"], "status": "available" }'
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
</RequestExample>
|
|
68
|
-
|
|
69
|
-
<ResponseExample title="200 OK">
|
|
70
|
-
|
|
71
|
-
```json
|
|
72
|
-
{
|
|
73
|
-
"id": 10,
|
|
74
|
-
"name": "doggie",
|
|
75
|
-
"photoUrls": ["https://example.com/doggie.png"],
|
|
76
|
-
"status": "available"
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
</ResponseExample>
|
|
81
|
-
|
|
82
|
-
<ResponseExample title="400 Invalid input">
|
|
83
|
-
|
|
84
|
-
```json
|
|
85
|
-
{ "code": 400, "message": "Invalid input" }
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
</ResponseExample>
|
|
89
|
-
|
|
90
|
-
<ObjectExample title="The Pet object">
|
|
91
|
-
|
|
92
|
-
```json
|
|
93
|
-
{
|
|
94
|
-
"id": 10,
|
|
95
|
-
"name": "doggie",
|
|
96
|
-
"category": { "id": 1, "name": "Dogs" },
|
|
97
|
-
"photoUrls": ["https://example.com/doggie.png"],
|
|
98
|
-
"tags": [{ "id": 1, "name": "friendly" }],
|
|
99
|
-
"status": "available"
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
</ObjectExample>
|
|
104
|
-
|
|
105
|
-
</Api>
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Delete a pet
|
|
3
|
-
description: Delete a pet from the store.
|
|
4
|
-
icon: paw-print
|
|
5
|
-
layout: api
|
|
6
|
-
method: DELETE
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
<script>
|
|
10
|
-
import { Api, Endpoint, ParamField, ResponseField, RequestExample, ResponseExample } from '$lib';
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
# Delete a pet
|
|
14
|
-
|
|
15
|
-
Delete a pet.
|
|
16
|
-
|
|
17
|
-
<Api>
|
|
18
|
-
|
|
19
|
-
<Endpoint method="DELETE" path={'/pet/{petId}'} baseUrl="https://petstore3.swagger.io/api/v3" />
|
|
20
|
-
|
|
21
|
-
## Headers
|
|
22
|
-
|
|
23
|
-
<ParamField name="api_key" type="string">
|
|
24
|
-
|
|
25
|
-
Your store API key.
|
|
26
|
-
|
|
27
|
-
</ParamField>
|
|
28
|
-
|
|
29
|
-
## Path parameters
|
|
30
|
-
|
|
31
|
-
<ParamField name="petId" type="integer" required>
|
|
32
|
-
|
|
33
|
-
The id of the pet to delete.
|
|
34
|
-
|
|
35
|
-
</ParamField>
|
|
36
|
-
|
|
37
|
-
## Returns
|
|
38
|
-
|
|
39
|
-
<ResponseField name="code" type="integer">
|
|
40
|
-
|
|
41
|
-
The HTTP status code of the result.
|
|
42
|
-
|
|
43
|
-
</ResponseField>
|
|
44
|
-
|
|
45
|
-
<RequestExample title="cURL">
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
curl -X DELETE https://petstore3.swagger.io/api/v3/pet/10 \
|
|
49
|
-
-H "api_key: special-key"
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
</RequestExample>
|
|
53
|
-
|
|
54
|
-
<ResponseExample title="200 OK">
|
|
55
|
-
|
|
56
|
-
```json
|
|
57
|
-
{ "code": 200, "message": "Pet deleted" }
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
</ResponseExample>
|
|
61
|
-
|
|
62
|
-
<ResponseExample title="400 Invalid value">
|
|
63
|
-
|
|
64
|
-
```json
|
|
65
|
-
{ "code": 400, "message": "Invalid pet value" }
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
</ResponseExample>
|
|
69
|
-
|
|
70
|
-
</Api>
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Find pets by status
|
|
3
|
-
description: Find pets filtered by status.
|
|
4
|
-
icon: paw-print
|
|
5
|
-
layout: api
|
|
6
|
-
method: GET
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
<script>
|
|
10
|
-
import { Api, Endpoint, ParamField, ResponseField, RequestExample, ResponseExample, EnumValues, Enum } from '$lib';
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
# Find pets by status
|
|
14
|
-
|
|
15
|
-
Multiple status values can be provided as comma separated strings.
|
|
16
|
-
|
|
17
|
-
<Api>
|
|
18
|
-
|
|
19
|
-
<Endpoint method="GET" path="/pet/findByStatus" baseUrl="https://petstore3.swagger.io/api/v3" />
|
|
20
|
-
|
|
21
|
-
## Query parameters
|
|
22
|
-
|
|
23
|
-
<ParamField name="status" type="enum" default="available">
|
|
24
|
-
|
|
25
|
-
The status to filter by.
|
|
26
|
-
|
|
27
|
-
<EnumValues>
|
|
28
|
-
<Enum value="available">Available for purchase.</Enum>
|
|
29
|
-
<Enum value="pending">Reserved, sale in progress.</Enum>
|
|
30
|
-
<Enum value="sold">Already sold.</Enum>
|
|
31
|
-
</EnumValues>
|
|
32
|
-
|
|
33
|
-
</ParamField>
|
|
34
|
-
|
|
35
|
-
## Returns
|
|
36
|
-
|
|
37
|
-
Returns an array of [Pet](/api/pet/pet-object) objects.
|
|
38
|
-
|
|
39
|
-
<ResponseField name="data" type="Pet[]">
|
|
40
|
-
|
|
41
|
-
The pets that match the status.
|
|
42
|
-
|
|
43
|
-
</ResponseField>
|
|
44
|
-
|
|
45
|
-
<RequestExample title="cURL">
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
curl "https://petstore3.swagger.io/api/v3/pet/findByStatus?status=available"
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
</RequestExample>
|
|
52
|
-
|
|
53
|
-
<ResponseExample title="200 OK">
|
|
54
|
-
|
|
55
|
-
```json
|
|
56
|
-
[
|
|
57
|
-
{ "id": 10, "name": "doggie", "status": "available" },
|
|
58
|
-
{ "id": 11, "name": "kitty", "status": "available" }
|
|
59
|
-
]
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
</ResponseExample>
|
|
63
|
-
|
|
64
|
-
<ResponseExample title="400 Invalid status">
|
|
65
|
-
|
|
66
|
-
```json
|
|
67
|
-
{ "code": 400, "message": "Invalid status value" }
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
</ResponseExample>
|
|
71
|
-
|
|
72
|
-
</Api>
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Find pets by tags
|
|
3
|
-
description: Find pets filtered by tags.
|
|
4
|
-
icon: paw-print
|
|
5
|
-
layout: api
|
|
6
|
-
method: GET
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
<script>
|
|
10
|
-
import { Api, Endpoint, ParamField, ResponseField, RequestExample, ResponseExample } from '$lib';
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
# Find pets by tags
|
|
14
|
-
|
|
15
|
-
Multiple tags can be provided as comma separated strings. Use `tag1`, `tag2`,
|
|
16
|
-
`tag3` for testing.
|
|
17
|
-
|
|
18
|
-
<Api>
|
|
19
|
-
|
|
20
|
-
<Endpoint method="GET" path="/pet/findByTags" baseUrl="https://petstore3.swagger.io/api/v3" />
|
|
21
|
-
|
|
22
|
-
## Query parameters
|
|
23
|
-
|
|
24
|
-
<ParamField name="tags" type="array of strings">
|
|
25
|
-
|
|
26
|
-
Tags to filter by.
|
|
27
|
-
|
|
28
|
-
</ParamField>
|
|
29
|
-
|
|
30
|
-
## Returns
|
|
31
|
-
|
|
32
|
-
Returns an array of [Pet](/api/pet/pet-object) objects.
|
|
33
|
-
|
|
34
|
-
<ResponseField name="data" type="Pet[]">
|
|
35
|
-
|
|
36
|
-
The pets that match the tags.
|
|
37
|
-
|
|
38
|
-
</ResponseField>
|
|
39
|
-
|
|
40
|
-
<RequestExample title="cURL">
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
curl "https://petstore3.swagger.io/api/v3/pet/findByTags?tags=friendly"
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
</RequestExample>
|
|
47
|
-
|
|
48
|
-
<ResponseExample title="200 OK">
|
|
49
|
-
|
|
50
|
-
```json
|
|
51
|
-
[{ "id": 10, "name": "doggie", "tags": [{ "id": 1, "name": "friendly" }] }]
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
</ResponseExample>
|
|
55
|
-
|
|
56
|
-
<ResponseExample title="400 Invalid tag">
|
|
57
|
-
|
|
58
|
-
```json
|
|
59
|
-
{ "code": 400, "message": "Invalid tag value" }
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
</ResponseExample>
|
|
63
|
-
|
|
64
|
-
</Api>
|