Skip to content

Add missing Draft & Publish availability note to methods overview#3119

Merged
pwizla merged 4 commits intostrapi:mainfrom
GorkyDemircn:main
May 6, 2026
Merged

Add missing Draft & Publish availability note to methods overview#3119
pwizla merged 4 commits intostrapi:mainfrom
GorkyDemircn:main

Conversation

@GorkyDemircn
Copy link
Copy Markdown
Contributor

@GorkyDemircn GorkyDemircn commented May 5, 2026

What does this PR do?

Adds a missing availability note after the Method Overview
table in the Document Service API reference page.

What was wrong?

The Method Overview table lists all 10 methods including
publish(), unpublish(), and discardDraft(). However, there
is no indication anywhere in the overview that these three
methods require Draft & Publish to be enabled on the
content-type.

A developer who has Draft & Publish disabled will see these
methods listed, call them, receive a confusing runtime error,
and find no explanation on this page.

Fix applied

Added a :::note admonition directly after the Method Overview
table clarifying that publish(), unpublish(), and
discardDraft() require Draft & Publish to be enabled.

Why it matters

Improves discoverability of a critical requirement at the
point where developers are first scanning the available
methods before they start writing code.

Related issue

No specific issue gap identified during architectural
analysis of the Strapi v5 Document Service API.

The Method Overview table lists publish(), unpublish(), and 
discardDraft() but does not indicate that these methods 
require Draft & Publish to be enabled on the content-type. 
Added a note admonition after the table to clarify this 
requirement before developers start writing code.
docs: add missing Draft & Publish availability note to method overview
@strapi-cla
Copy link
Copy Markdown

strapi-cla commented May 5, 2026

CLA assistant check
All committers have signed the CLA.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
documentation Ready Ready Preview, Comment May 6, 2026 9:34am

Request Review

Comment thread docusaurus/docs/cms/api/document-service.md Outdated
Comment thread docusaurus/docs/cms/api/document-service.md Outdated
@pwizla pwizla self-assigned this May 6, 2026
@pwizla pwizla added internal PRs created by the Strapi core team pr: chore contribution PRs that are part of the Documentation Contribution Program source: CMS labels May 6, 2026
@pwizla pwizla added this to the 6.24.0 milestone May 6, 2026
@pwizla
Copy link
Copy Markdown
Collaborator

pwizla commented May 6, 2026

Thank you, @GorkyDemircn! That's a very neat and meaningful addition, indeed.

I directly edited some content:

  • wrong usage of bold formatting (we mostly use this for button names, or other edge cases)
  • the PR incorrectly fixed a code example, changing findOne to discard.

The PR is now approved, merged, should be live on docs.strapi.io in a few minutes, and will be mentioned in the next weekly snapshot release.

@pwizla pwizla changed the title docs: add missing Draft & Publish availability note to method overview Add missing Draft & Publish availability note to methods overview May 6, 2026
@pwizla pwizla merged commit 5121bb9 into strapi:main May 6, 2026
23 checks passed
@pwizla pwizla removed the internal PRs created by the Strapi core team label May 6, 2026
@GorkyDemircn
Copy link
Copy Markdown
Contributor Author

Thank you for the thoughtful review and for improving the content. I really appreciate the corrections and your guidance.

I’m glad the contribution was helpful, and it’s great to see it merged. Looking forward to contributing again in the future.

Thanks again! @pwizla

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

Labels

contribution PRs that are part of the Documentation Contribution Program pr: chore source: CMS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants