vue-openapi

Display API documentation that follow the OpenAPI 3.0 Specification

Replaced by @koumoul/vue-openapi
Last updated 3 years ago by albanm .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vue-openapi 
SYNC missed versions from official npm registry.

OpenAPI viewer component for VueJS

This Vue.js component is designed to easily browse and test a REST API described with the OpenAPI 3.0 Specification (formerly known as Swagger Specification). This component follows Google Material Design principles and relies on the Vue Material framework. It also relies on vue-resource to perform API requests.

See it in action :

Install

npm :

$ npm install --save vue-openapi

yarn:

$ yarn add vue-openapi

Usage

import Vue from 'vue'
import VueMaterial from 'vue-material'
import OpenApi from 'vue-openapi'
import 'vue-material/dist/vue-material.css'
import VueResource from 'vue-resource'

import jsonApi from './swagger.json'

Vue.use(VueMaterial)
Vue.use(VueResource)

new Vue({
  el: '#app',
  template: '<open-api v-if="jsonApi" :api="jsonApi" md-theme="\'default\'" :query-params="queryParams" :headers="headers"></open-api>',
  data: () => ({
    jsonApi: jsonApi,
    queryParams: {
      userId: 'john_doe'
    },
    headers: {
      api_key: 'my_api_key'
    }
  }),
  components: {
    OpenApi
  }
})

Develop

Run webpack in watch mode:

npm run dev

Then open test/index.html in your browser.

License

MIT License

Resources

Similar projects

This project has been inspired by the following projects :

Current Tags

  • 0.10.0                                ...           latest (a year ago)

25 Versions

  • 0.10.0 [deprecated]           ...           a year ago
  • 0.9.2 [deprecated]           ...           a year ago
  • 0.9.1 [deprecated]           ...           a year ago
  • 0.9.0 [deprecated]           ...           a year ago
  • 0.8.0 [deprecated]           ...           2 years ago
  • 0.7.1 [deprecated]           ...           2 years ago
  • 0.7.0 [deprecated]           ...           2 years ago
  • 0.6.1 [deprecated]           ...           2 years ago
  • 0.6.0 [deprecated]           ...           2 years ago
  • 0.5.3 [deprecated]           ...           2 years ago
  • 0.5.2 [deprecated]           ...           2 years ago
  • 0.5.1 [deprecated]           ...           2 years ago
  • 0.5.0 [deprecated]           ...           2 years ago
  • 0.4.4 [deprecated]           ...           3 years ago
  • 0.4.3 [deprecated]           ...           3 years ago
  • 0.4.2 [deprecated]           ...           3 years ago
  • 0.4.1 [deprecated]           ...           3 years ago
  • 0.4.0 [deprecated]           ...           3 years ago
  • 0.3.1 [deprecated]           ...           3 years ago
  • 0.3.0 [deprecated]           ...           3 years ago
  • 0.2.2 [deprecated]           ...           3 years ago
  • 0.2.1 [deprecated]           ...           3 years ago
  • 0.2.0 [deprecated]           ...           3 years ago
  • 0.1.1 [deprecated]           ...           3 years ago
  • 0.1.0 [deprecated]           ...           3 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |