{"repo":"zuplo-samples/db2openapi","free":true,"listed":false,"github":"https://github.com/zuplo-samples/db2openapi","clone":"git clone https://github.com/zuplo-samples/db2openapi.git","description":"Generate an OpenAPI/Swagger specification from your SQL database","language":"JavaScript","stars":15,"topics":["database","open-api","openapi","swagger"],"license":"MIT","category":"databases-storage","readme_excerpt":"DB2OpenAPI Generate an OpenAPI/Swagger specification from your SQL database. The OpenAPI spec will be written to a file. Motivation There are several DB to API projects out there, but they almost all lock you into building your API a certain way or using their managed service to get the full experience. I'd prefer to decouple the API definition from the API implementation - you are free to use your generated OpenAPI specification with any OpenAPI-compliant web framework (ex. Huma, tsoa, Connexion) and develop your DB-backed CRUD APIs with tools you're already familiar with / using. If you don't want to tie your API directly to your database, this is essentially a quickstart to building a CRUD API. Database Support This project uses Sequelize under the hood, which supports - PostgreSQL - MariaDB - MySQL - MSSQL - SQLite - Oracle Local Installation Usage Invoke using the db2openapi command. Here's an example connecting to a Supabase Postgres Database: Option Required Description -------------------- -------- ----------------------------------------------------------- -t or --type Y Database type (e.g., postgres, mysql) -h or --host Y Database host -p or --port Y Database port -u or --username Y Database username -P or --password Y Database password -d or --database Y Database name -o or --output N Output file for the OpenAPI document. Default: openapi.json The output OpenAPI file will have CRUD endpoints (Ex. GET, GET all, POST, PATCH, DELETE) generated for you, alongside an Op","default_branch":null,"files":null,"tree":[],"storefront":"/r/zuplo-samples","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/zuplo-samples/db2openapi/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}