auto_swagger

create HTTP request from backend swagger spec json file.

1
0
Vue

AutoSwagger

AutoSwagger is a swagger(openAPI) tool running in Electron, it can import a swagger(openAPI) document then send request and receive response in a convenience way.

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:9080
npm run dev

# build electron application for production
npm run build

ScreenShot

screenshot

NPM Packages

Name Desc
vue 🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
vue-electron The vue plugin that wraps electron APIs to the Vue object.
lowdb ⚡ lowdb is a small local JSON database powered by Lodash (supports Node, Electron and the browser)
got Simplified HTTP requests. like axios
element-ui A Vue.js 2.0 UI Toolkit for Web
iview A high quality UI Toolkit built on Vue.js 2.0
jsoneditor A web-based tool to view, edit, format, and validate JSON
mavon-editor A markdown editor based on Vue that supports a variety of personalized features
fs-extra Node.js: extra methods for the fs object like copy(), remove(), mkdirs()
lodash A modern JavaScript utility library delivering modularity, performance, & extras.
lodash-id Makes it easy to manipulate id-based resources with lodash or lowdb
countup.js Animates a numerical value by counting to it
vue-moment Handy Moment.js filters for your Vue.js project.
vue-smooth-dnd Vue wrappers components for smooth-dnd
vue-splitpane Split-Pane component built with vue2.0, can be split vertically or horizontally.

DataBase Objects

these objects initialized in `src/renderer/datastore/index.js’

  • workspace represnt for one swagger json document
{
	"id":0,
	"name":"default-workspace",
	"desc":""
}
  • folder corresonding tags in swagger json document
{
	"id":0,
	"workspaceId":0,
	"name":"default-folder"
}
  • request
{
	"id":0,
	"workspaceId":0,
	"folderId":null,
	"name":"new-request-01",
	"method":"GET",
	"url":"",
	"data":null,
	"sort":0
}
  • response
{
    "id":null,
    "requestId":null,
    "header":null,
    "data":null
}
  • lastState app state, would restore everytime
{
	id: 0,
    lastWorkspaceId: 0,
    lastFolderId: 0,
    lastRequestId: 0,
    openedSubmenuList:[]
}

This project was generated with electron-vue using vue-cli,lowdb. Documentation about the original structure can be found here.