RestApi icon indicating copy to clipboard operation
RestApi copied to clipboard

Init fork v1 // Make the REST Api a little bit more Processwire'esque

Open Luis85 opened this issue 6 years ago • 1 comments

Extended Install routine

  • added api template
  • added api fields
  • add api route container
  • added example route pages

Changes to routes.php

  • added method to grab pw created pages as routes

  • let the module scan for new api classes

  • changed file structure

Luis85 avatar Dec 06 '18 10:12 Luis85

@Luis85 Thanks for your input and your work on the module – it's really appreciated! However, I'm personally not sure if it is the most sensible approach to define the endpoints in ProcessWire itself:

  • It's slower compared to just copy&paste a line in Routes.php
  • the routes are not going to be version controlled in git (which is my main pain point here)
  • it's going to be a developer anyway, who implements the endpoint's logic. So I guess this person is probably comfortable to add the corresponding route aswell

I can't see any real upsides to this approach from my point of view. If I'm missing something here, I'd be happy if you could elaborate :)

thomasaull avatar Dec 27 '18 11:12 thomasaull