arturobernalg opened a new pull request, #646: URL: https://github.com/apache/jspwiki/pull/646
Part of [JSPWIKI-1310](https://issues.apache.org/jira/browse/JSPWIKI-1310). This pull request builds on #589, #590 and #645, so it shows their commits until they are merged; the new commit is the last one. Adds three more read-only endpoints to the REST API version 1, all described in `openapi.yaml`: - `GET /api/v1/pages`: the names of the pages the caller may view, sorted by name. The parameters `max` (default 20) and `offset` read a long list in chunks. - `GET /api/v1/pages/{name}/references`: the pages that link to the page (`referredBy`) and the pages it links to (`refersTo`). Pages the caller may not view are left out; a link to a page that is not written yet is kept. - `GET /api/v1/pages/{name}/html`: the page rendered to HTML as the wiki shows it to the caller, without the template. The optional parameter `version` works as in the endpoint that reads the markup. The same rules as in the other endpoints apply: view permission is needed (401 for anonymous, 403 for a logged in caller), a page that does not exist is 404, and an offset that is not an integer of zero or more is 400. Tested with `ApiV1ServletTest`, 40 tests, each answer compared with `openapi.yaml`, including that a page with an ACL is neither listed nor linked nor rendered for a caller who may not view it. Also run on a war in Tomcat 10.1: list, chunks, bad offset, references in both directions, HTML, a page with an ACL (401) and an unknown page (404). Not tried: a logged in caller on the running wiki (covered only by the test). -- 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]
