arturobernalg commented on PR #589:
URL: https://github.com/apache/jspwiki/pull/589#issuecomment-7031467790

   Thanks both. Juan Pablo, the separate module and Jackson instead of Gson are 
done in #650, which builds on this one and the next ones: the REST API is the 
module jspwiki-rest-api and its JSON is written with Jackson. I have not looked 
yet at the endorsed library or at openapi-generator.
   
   Alex, about WikiAjaxServlet: I read WikiAjaxDispatcherServlet and I kept a 
plain servlet for this API for three reasons that come from how the dispatcher 
works. It maps /ajax/ServletName/action and takes anything else only from the 
parameter params, a list separated by commas, so a page name with a comma 
cannot be a parameter and the pages cannot be resources of the URL, as 
/api/v1/pages/Name is. It asks for the anti-CSRF token in every call, also in 
GET, which is right for the pages of the wiki but gets in the way of a client 
that is not a page. And it gives one permission for the whole servlet, while 
here it is the view permission of each page. The answers with 401, 403 and 404 
and the OpenAPI file that a test compares with them describe the URLs as they 
are.
   
   Plugins can keep bringing their own REST through WikiAjaxServlet, nothing 
changes for them. If you still prefer the API to go through the dispatcher, I 
can look at what it would need, but it would change the URLs. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to