Page by Spec
You can use the OASpec
component to render all operations in any Markdown file.
If you have configured the OpenAPI Specification using the useOpenapi
composable in your .vitepress/theme/index.[js,ts]
file, you can just use the OASpec
component to render all operations in any Markdown file.
markdown
---
aside: false
outline: false
title: vitepress-openapi
---
<script setup lang="ts">
import { useData } from 'vitepress'
const { isDark } = useData()
</script>
<OASpec :isDark="isDark" />