[
https://issues.apache.org/jira/browse/JSPWIKI-1310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18133493#comment-18133493
]
Arturo Bernal commented on JSPWIKI-1310:
----------------------------------------
Plan after the discussion on dev (Alex O'Ree, Juan Pablo Santos). Nothing is
implemented yet.
# Inventory of the endpoints that exist today: servlets, JSPs, the /ajax/
services, the XML-RPC endpoints and the Atom feed. For each one: method, path,
parameters, response and required permission.
2. An OpenAPI description, written by hand, for new versioned endpoints. No new
dependency in jspwiki-main. A module with CXF or something similar can be
reconsidered later if the group wants it.
3. The existing endpoints move to the contract over time, so that only a few
top level JSPs remain.
4. A test that compares the description with the real endpoints, to reduce the
cost of keeping it up to date.
Still open: whether the endpoints live in jspwiki-main or in a new module.
> Add a versioned REST API with an OpenAPI description
> ----------------------------------------------------
>
> Key: JSPWIKI-1310
> URL: https://issues.apache.org/jira/browse/JSPWIKI-1310
> Project: JSPWiki
> Issue Type: New Feature
> Reporter: Arturo Bernal
> Priority: Major
>
> JSPWiki has no documented REST API. What exists today is the following.
>
> The servlet at /ajax/ (WikiAjaxDispatcherServlet), where the managers
> register JSON endpoints for the web user interface: users, search, the
> progress tracker and the ones that plugins define. They are made for the UI,
> are not documented and make no promise of stability.
>
> XML-RPC (/RPC2/ and /RPCU/), which web.xml has commented out by default, and
> the Atom API (/atom/).
>
> The build has no JAX-RS, OpenAPI or similar dependency.
>
> Proposal: a versioned REST API that speaks JSON and is described with
> OpenAPI, so that integrations, bots and other front ends do not have to
> depend on the ajax endpoints of the UI or on XML-RPC.
>
> Things to settle before writing code, which should be discussed on
> [[email protected]|mailto:[email protected]] first:
> the scope of a first version (read operations on pages, versions, attachment
> metadata, search and referrers; write operations later);
> how callers authenticate (the wiki session with its CSRF token, API tokens,
> or the container) and how permissions are enforced, which should be the same
> AuthorizationManager and ACLs as in the UI;
> the technology (a Jakarta REST implementation or plain servlets) and where
> the code lives (a new module?), on Java 17;
> what happens to the XML-RPC and Atom APIs (kept, deprecated);
> how the OpenAPI description is produced (from annotations or written by hand)
> and published.
>
> This ticket is only the proposal; there is no implementation.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)