Skip to content

480/mysql2swagger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mysql2swagger

Generate Swagger v2 Specification JSON schema from mysql tables. This is forked and refactoring from https://github.com/okunishinishi/node-mysqlspec

Installation

npm install https://github.com/480/mysql2swagger.git --save-dev

Usage

Describe database data.

var mysql2swagger = require('mysql2swagger');

// Mysql connect config.
var config = {
    user: 'root',
    password: 'my_password',
    host: 'localhost',
    database: 'my_db'
};
// Get spec for connected database
mysql2swagger(config, "DatabaseName", "TableName", function (err, schema) {
    console.log(JSON.stringify(schema, null, 4));
});

License

This software is released under the MIT License.

Links

About

Mysql Table to Swagger API Specification Json

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published