0.5.2 • Published 1 year ago

@kong-ui-public/spec-details v0.5.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

@kong-ui-public/spec-details

A Kong UI component for displaying API specs

Features

  • Render .yaml and .json OAS specs
  • Customize display of API specs in the UI

Requirements

  • vue must be initialized in the host application

Usage

Install

Install the component in your host application

yarn add @kong-ui-public/spec-details

Register

You can register portal-spec-details globally or locally.

// Global registration
import { createApp } from 'vue'
import SpecDetails from '@kong-ui-public/spec-details'
import '@kong-ui-public/spec-details/dist/style.css'

const app = createApp(App)

app.use(SpecDetails)
<!-- Local registration -->
<template>
  <SpecDetails />
</template>

<script setup lang="ts">
import SpecDetails from '@kong-ui-public/spec-details'
import '@kong-ui-public/spec-details/dist/style.css'
</script>

Props

document

  • type: String|Object
  • required: false
  • default: null

Specification object or string. Required if url property is not set.

url

  • type: String
  • required: false
  • default: ''

URL of the specification file. Required if document property is not set.

hasSidebar

  • type: Boolean
  • required: false
  • default: true

Whether or not the SwaggerUI navigation sidebar is enabled.

relativeSidebar

  • type: Boolean
  • required: false
  • default: false

Position the sidebar relatively instead of fixed. Both hasSidebar and essentialsOnly must be true for the positioning to be correct since we aren't predicting the height of the info block.

essentialsOnly

  • type: Boolean
  • required: false
  • default: false

If enabled, only display the spec paths section; general information, schemes, models, actions (Authorize & Try it out), etc. are hidden.

activeOperation

  • type: Object
  • required: false
  • default: null

Allows to expand specification operation details section for given operation and scroll the viewport to it.

0.5.2

1 year ago

0.5.1

1 year ago

0.5.0

1 year ago

0.4.0

1 year ago

0.3.7

1 year ago

0.3.6

1 year ago

0.3.5

1 year ago

0.3.4

1 year ago

0.3.3

1 year ago