A Kong UI component for displaying and filtering API specs
- Render spec with optional side nav and filtering
-
vue
must be initialized in the host application -
@kong/kongponents
must be available as adependency
in the host application, along with the package's style imports. See here for instructions on installing Kongponents. Specifically, the following Kongponents must be available:KBadge
KCollapse
KIcon
KInput
Install the component in your host application
yarn add @kong-ui-public/spec-renderer
You can register spec-renderer
locally. In order to support proper tree-shaking in the host application, please only import and register the components in the page/component where they are being utilized.
<!-- Local registration -->
<template>
<SpecRenderer />
<SpecOperationsList />
<SpecDetails />
</template>
<script setup lang="ts">
// Only import the components you need
import { SpecRenderer, SpecOperationsList, SpecDetails } from '@kong-ui-public/spec-renderer'
// CSS import required for ANY of the components
import '@kong-ui-public/spec-renderer/dist/style.css'
</script>
The SpecRenderer
component is a combination of two subcompoents, SpecOperationsList
and SpecDetails
which are exported for individual use if desired.
See the component documentation.
See the component documentation.
See the component documentation.