arturobernalg opened a new pull request, #650:
URL: https://github.com/apache/jspwiki/pull/650

   Part of [JSPWIKI-1310](https://issues.apache.org/jira/browse/JSPWIKI-1310). 
This pull request builds on #589, #590, #645 and #646, so it shows their 
commits until they are merged; the new commit is the last one.
   
   It does the two changes that Juan Pablo asked for in #589:
   
   - The REST API is in its own Maven module, `jspwiki-rest-api`: the servlet, 
`openapi.yaml` and the tests moved from `jspwiki-main` without a change of 
package or class name, so the `web.xml` of the war is the same. The war, the 
BOM and the root pom list the new module. `jspwiki-main` does not depend on it.
   - The JSON is written with Jackson, which the wiki already uses, and not 
with Gson. The answers are records. A field without a value, such as the author 
of a page that has none, is left out, as before. One difference: Jackson does 
not escape characters such as equals signs or angle brackets as unicode 
escapes, as Gson did, which is still valid JSON for every client.
   
   The tests moved too and read the answers with Jackson. They need the user 
and group databases of the tests of `jspwiki-main`, which they read from the 
file system, so the module has a copy of those two files in its test resources.
   
   Checked: the 41 tests of the module pass, and a war built from this branch 
in Tomcat 10.1 answered the list of pages, a page, its history, attachments, 
references and HTML, a page with an ACL (401), an unknown page (404) and a bad 
offset (400). Not tried: the search in that war, whose index was not built yet 
(the tests cover it).
   
   Not done, because it is a bigger change: Alex's idea to use the plugin 
system of `WikiAjaxServlet`.


-- 
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