Open teodesian opened 1 year ago
have some small amount of work already done on this pushed to gogs copy, intend to keep working on this as I get time
One nice thing about this idea is that when all the routes are like this we can do things like autogenerate a swagger.json to describe the API of tCMS... and autogenerate a tCMS client for things like APIs.
So I've done half the work here by making the renderers and theming content-type aware.
What's next is getting the route handlers themselves to do the right thing too.
Currently there's no systematic mapping of route handlers. What we ideally should have is something that routes MIMEtypes provided in the
Accept:
header to the appropriate rendering module for a given route. If none is supplied, the route itself should define a default.This also needs to be themable -- e.g. you can subclass in the themes/ directory for use in your custom routes & route overrides.
This will require the routes themselves to be re-factored to be renderer-agnostic, and the templating system to accomodate this. This is a JUMBO size t-shirt amigo