Skip to content

feat(codegen,http): WordPress paging by header, force-delete key, date publish rule, path-scoped sign-in - #655

Merged
leemour merged 2 commits into
mainfrom
feat/wp-gaps
Nov 18, 2026
Merged

leemour merged 2 commits into
mainfrom
feat/wp-gaps

Conversation

@leemour

@leemour leemour commented Nov 18, 2026

Copy link
Copy Markdown
Member

Task

Finish the WordPress connector's foundation gaps found while generating it from wp-json (cli-base #647).

Why

  • api … --all refused every WordPress list: WordPress answers the list itself and gives the page count only in X-WP-TotalPages, and answers a page past the end with 400.
  • DELETE …?force=true deletes for good, a plain delete moves to the trash; both needed the same key.
  • WordPress publishes a scheduled post whose date moves into the past, with no status in the call, so the publish key on status alone missed it.
  • A site under a path (host/blog, multisite in subfolders) shares its host with others; the origin check let a redirect carry the sign-in to host/other.
  • One batch/v1 call runs other routes' writes past their keys.

What

  • Page style: start, pagesHeader, items: "". wpJsonToOpenApi returns overrides giving each collection read page-from-1 by X-WP-TotalPages.
  • permissions.forceFlags: <group>.delete.force beside <group>.delete.
  • valueKeys[].also: setting date/date_gmt needs the publish key unless the call itself sets status to another value the enum lists (draft, pending, private). A call without status needs the key. A misspelt also stops generation.
  • hostFetch credentialScope: a signed request outside it (encoded slashes included) is refused before sending; a redirect out of it drops the credential headers.
  • wpJsonToOpenApi refuses batch/v1.

Testing

  • vitest run full suite: 77 files, 1291 tests passed (before review fixes); codegen + http after fixes: 237 passed.
  • The full WordPress 6.9.4 snapshot generates: date rule on posts, pages, media, blocks, navigation (with autosaves); .delete.force on every delete taking force; 23 collection reads paged.
  • A fresh review: encoded-slash escape, an unchecked also, looser pagination checks, and doc mismatches found and fixed.

🤖 Generated with Claude Code

leemour and others added 2 commits November 19, 2026 00:01
…e publish rule, path-scoped sign-in

- Page style takes `start` and `pagesHeader`, and `items: ""` for an answer that is the list.
  wpJsonToOpenApi returns `overrides` giving every collection read page-from-1 by X-WP-TotalPages.
- permissions.forceFlags: a delete taking `force` also gets `<group>.delete.force`, applying when true.
- valueKeys[].also: setting `date`/`date_gmt` needs the publish key unless the call itself sets
  status to draft, pending or private (written as body fields plus `unless`).
- hostFetch credentialScope: a signed request outside the site's path is refused before sending,
  and a redirect out of it drops the credential headers.
- wpJsonToOpenApi refuses the batch/v1 namespace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… misspelt also stops generation, pagination checks stay strict

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leemour
leemour merged commit fa17a7a into main Nov 18, 2026
10 checks passed
@leemour
leemour deleted the feat/wp-gaps branch November 18, 2026 23:11
@leemour leemour mentioned this pull request Nov 18, 2026
leemour added a commit that referenced this pull request Nov 18, 2026
Version 0.120.0: the WordPress gaps (#655) and the Postman converter
(#654); folds the attio parity fragment.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant