Commit 67ffda1072
Unsigned
Layout: unified · split
web/src/pages/api/index.astro added +34
| @@ -0,0 +1,34 @@ | ||
| 1 | --- | |
| 2 | import Layout from '@layouts/Layout.astro'; | |
| 3 | import Buton from '@components/form/Button.astro'; | |
| 4 | ||
| 5 | import MainCard from '@components/scafold/MainCard.astro'; | |
| 6 | ||
| 7 | --- | |
| 8 | ||
| 9 | <Layout title="API Docs | Awesome Privacy"> | |
| 10 | ||
| 11 | <MainCard> | |
| 12 | <div id="swagger-ui"></div> | |
| 13 | </MainCard> | |
| 14 | ||
| 15 | </Layout> | |
| 16 | ||
| 17 | <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.1.3/swagger-ui.css" > | |
| 18 | <script is:inline src="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.1.3/swagger-ui-bundle.js"></script> | |
| 19 | <script> | |
| 20 | window.onload = () => { | |
| 21 | SwaggerUIBundle({ | |
| 22 | url: 'https://raw.githubusercontent.com/Lissy93/awesome-privacy/main/api/open-api-spec.yml', | |
| 23 | dom_id: '#swagger-ui', | |
| 24 | deepLinking: true, | |
| 25 | presets: [ | |
| 26 | SwaggerUIBundle.presets.apis, | |
| 27 | SwaggerUIBundle.SwaggerUIStandalonePreset | |
| 28 | ], | |
| 29 | plugins: [ | |
| 30 | SwaggerUIBundle.plugins.DownloadUrl | |
| 31 | ] | |
| 32 | }); | |
| 33 | } | |
| 34 | </script> | |