Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

DB-Connected REST service should create fields automatically from DB schema #37

Open
kaloyan-raev opened this issue May 14, 2014 · 4 comments

Comments

@kaloyan-raev
Copy link

Usually, DB-connected services are created on databases that already exist. So, the DB schema is already known and Apigility can automatically configure the DB columns as fields in the REST service. Apigility can also automatically configure some attributes of the fields, e.g. if the field is required, or create a validator that ensures an integer input, etc.

At the moment, after creating the DB-connected service, I have to edit it and add all these fields myself, which is error prone. I have to look at the DB schema and type the exact column names as field names.

This improvement will bring this RAD feature one step forward.

@jguittard
Copy link

I could not agree more... Hopefully, I've been working on this need and already made a PR that is to be implemented in version 1.1 in about a month.
Basically, it's called "Database Autodiscovery". You'll get an extra-tab on the REST service creation screen. After choosing your adapter, DB Autodiscovery will introspect your DB schema and generate DB-connected services as well as fields, based on column definitions. It's for now stable and just need a bit of cleaning and unit testing.
Stay tuned ;)

@kaloyan-raev
Copy link
Author

Sounds great!

@weierophinney
Copy link
Member

@kaloyan-raev You can see the work @jguittard has done in zfcampus/zf-apigility-admin#179

@michalbundyra
Copy link
Member

This repository has been closed and moved to laminas-api-tools/api-tools; a new issue has been opened at laminas-api-tools/api-tools#71.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants