Skip to content

Add APIv3 Wiki Pages CRUD, forms, schema, and activities - #24673

Draft
asymetryk wants to merge 1 commit into
opf:devfrom
asymetryk:wp-wiki-pages-api
Draft

Add APIv3 Wiki Pages CRUD, forms, schema, and activities#24673
asymetryk wants to merge 1 commit into
opf:devfrom
asymetryk:wp-wiki-pages-api

Conversation

@asymetryk

Copy link
Copy Markdown

Summary

  • Expands the stub GET /api/v3/wiki_pages/{id} into a Versions-shaped Wiki Pages APIv3: collection index, project-scoped listing, create/update with forms + schema, delete with hierarchy todo semantics (nullify / destroy / reassign), and journal activities.
  • Reuses existing WikiPages::{Create,Update}Service and contracts; adds WikiPages::DeleteService / DeleteContract (delete requires :manage_wiki, matching UI destroy).
  • Updates OpenAPI paths/schemas and FAQ so wiki pages can be created/updated/deleted via API.

Motivation

Community and FAQ previously stated wiki content could not be updated via API. Domain services already exist; this exposes them with HAL+JSON, IDOR-safe visibility (WikiPage.visible), optimistic locking via lockVersion, and documented distinction from journal version.

Test plan

  • bundle exec rspec spec/requests/api/v3/wiki_pages/ wiki_pages_resource_spec.rb spec/lib/api/v3/wiki_pages/ spec/services/wiki_pages/delete_service_spec.rb
  • Manual: create page with Markdown text + project link; PATCH with stale lockVersion → conflict; DELETE leaf; DELETE parent with children requires todo
  • Verify attachments sub-resource still works; activities require :view_wiki_edits
  • Confirm OpenAPI /api/v3/spec.yml lists new wiki_pages paths

Homelab / deploy note

Self-hosted instances on 17.5.x should upgrade to a release containing this change rather than carrying a long-lived fork patch.

Made with Cursor

Expand the wiki_pages stub into a Versions-shaped HAL+JSON API with
project-scoped listing, create/update forms, optimistic locking,
manage_wiki-gated delete (nullify/destroy/reassign), and journal
history, reusing existing WikiPages services and contracts.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant