Loading repository data…
Loading repository data…
mcadecio / repository
Transform any database you have into a RESTful API.
This project is meant to provide a simple restful interface to interact with databases. It features the ability to act as a proxy between any servers over a TCP connection. Also, it has the ability to read selected tables and generate an OpenApi spec.
Currently, it supports the following databases:
mvn clean package
cd universal-database-proxy-rest
java -jar -Dproject.config=cfg/config.json target/universal-database-proxy-rest-1.0.2-fat.jar
docker/config.json as a base.postgresApi object.
enabled property to truehost to the address the HTTP Server should attach to. This can be localhost or 0.0.0.0
or some.address.com.port to the port number the HTTP Server should listen for connection on. This can be any valid port
number.openApiFilePath to where you want the OpenApi file generated to be stored. For
example: ./pgOpenApi.yamldatabase object holds configuration regarding the database we are trying base of our API from.host to the address of the database. For example: localhost or 0.0.0.0 or some.address.com. This
can be the host in plain text or the name of an ENVIRONMENT VARIABLE.port to the port number the database is listening for connections on. This can be any valid port
number.username to the database username the server should use to authenticate itself against your chosen
database. This can be the username in plain text or the name of an ENVIRONMENT VARIABLE.password to the database password the server should use to authenticate itself against your chosen
database. This can be the password in plain text or an ENVIRONMENT VARIABLE. For example: admin
or POSTGRES_PASSWORDdatabaseName to the name of the database you want the OpenApi to be generated from. This can be the
name of the database in plain text or the name of an ENVIRONMENT VARIABLE.-Dproject.config= argument to the path of
the config.json file you just create.docker/config.json as a base.cockroachApi object.
enabled property to truehost to the address the HTTP Server should attach to. This can be localhost or 0.0.0.0
or some.address.com.port to the port number the HTTP Server should listen for connection on. This can be any valid port
number.openApiFilePath to where you want the OpenApi file generated to be stored. For
example: ./crbOpenApi.yamldatabase object holds configuration regarding the database we are trying base of our API from.host to the address of the database. For example: localhost or 0.0.0.0 or some.address.com. This
can be the host in plain text or the name of an ENVIRONMENT VARIABLE.port to the port number the database is listening for connections on. This can be any valid port
number.username to the database username the server should use to authenticate itself against your chosen
database. This can be the username in plain text or the name of an ENVIRONMENT VARIABLE.password to the database password the server should use to authenticate itself against your chosen
database. This can be the password in plain text or an ENVIRONMENT VARIABLE. For example: admin
or COCKROACH_PASSWORDdatabaseName to the name of the database you want the OpenApi to be generated from. This can be the
name of the database in plain text or the name of an ENVIRONMENT VARIABLE.-Dproject.config= argument to the path of
the config.json file you just create.There is a working example in the docker folder on how to integrate in a docker-compose file.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
MIT License
Copyright (c) 2021 Dercio Daio
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.