I constantly find myself writing writing very redundant code when it comes to creating a REST API and a simple web interface.
The most common scenario would be a config endpoint that allows changing settings and one or multiple HTTP forms that interact with that endpoint.
Ideally I would just have to create a simple file that contains an array with all the possible settings and then some smart piece of code would take that and automatically generate a REST and WebSockets API for it along with a simple HTML page that generates a form for all the available settings.
Or how about a simple class with a bunch of setters and getters? Sometimes you just want to expose those as GET/PUT/POST routes and it would save a lot of time and maintenance work if you could somehow utilize reflection to automatically generate those routes.
I mean this obviously wouldn’t work for every scenario, but it still seems like there are so many scenarios that it would really be nice to have a simple library for that.
Does something like this exist by any chance?