Build a REST CRUD screen from an OpenAPI spec without writing code
Most admin screens are the same thing over and over: a table, a "New" button, a form in a dialog, edit on row click, delete in a row menu. Wiring that to a REST API by hand takes an afternoon each time. In this video I
Most admin screens are the same thing over and over: a table, a "New" button, a form in a dialog, edit on row click, delete in a row menu. Wiring that to a REST API by hand takes an afternoon each time.
In this video I build the whole thing in NGX View Builder, starting from an empty page, against a demo CRM API.
What happens in the video
1. Endpoints become data sources (0:50)
The API tab reads the OpenAPI spec and lists every endpoint. You can try a call right there, then turn the endpoints you need into data sources. Each one keeps its method and URL, including path parameters like {id}.
2. A table bound to the list endpoint (2:04)
The table gets List customers as its source, and the columns are picked from the response fields.
3. A dialog form for one record (2:48)
A "New customer" button opens a dialog. Inside it, an object panel holds one record, and the fields are named like the API properties, so the form value already has the shape the API expects. Dropdowns are filled from lookup endpoints.
4. Save, load, delete (4:38)
The form value goes into the request body as {customer}. Save calls POST for a new record and PUT for an existing one. A row click loads the record with GET by id, and a row action calls DELETE.
5. Testing the full CRUD (6:31)
Create, edit and delete a customer end to end.
Try it yourself
The builder runs in the browser with the same demo API, no sign up:
https://demo.ngxviewbuilder.io/builder
Docs on data sources: https://ngxviewbuilder.io/creators/data-sources
Full disclosure: I'm the developer. The runtime that renders the views in your Angular app is free, the designer needs a paid license.
If you build internal tools or admin screens in Angular, I'd like to hear what you'd need from a tool like this before using it in a real project.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.