Describe the bug
planecli doc create crashes with a pydantic ValidationError before any request is sent, because CreatePage(name=title) is constructed without the description_html field, which is required (no default) in the current plane-sdk.
To Reproduce
planecli doc create --title "Test doc" --content "hello" -p SOME_PROJECT
Expected behavior
A document is created (or at least the request is attempted).
Actual behavior
pydantic_core._pydantic_core.ValidationError: 1 validation error for CreatePage
description_html
Field required [input_value={'name': 'Test doc'}, input_type=dict]
Environment
- planecli 0.5.1
- plane-sdk 0.2.21
- Python 3.11
Root cause
In src/planecli/commands/documents.py (create command):
page_data = CreatePage(name=title)
if content:
page_data.description_html = f"<p>{content}</p>"
plane-sdk's CreatePage model (see plane.models.pages) declares description_html: str with no default, so model construction fails immediately. name is the only field that can be passed unconditionally.
Suggested fix
page_data = CreatePage(name=title, description_html="")
if content:
page_data.description_html = f"<p>{content}</p>"
I can open a PR with this one-line change if you'd like.
Note (may or may not be related)
After applying the fix locally, doc create (and doc ls) on a self-hosted Plane instance returns HTTP 404: Page not found for both project pages and workspace pages endpoints. That may be a separate server-version issue, but flagging in case page support was removed/changed in newer Plane versions.
Describe the bug
planecli doc createcrashes with a pydanticValidationErrorbefore any request is sent, becauseCreatePage(name=title)is constructed without thedescription_htmlfield, which is required (no default) in the currentplane-sdk.To Reproduce
Expected behavior
A document is created (or at least the request is attempted).
Actual behavior
Environment
Root cause
In
src/planecli/commands/documents.py(create command):plane-sdk'sCreatePagemodel (seeplane.models.pages) declaresdescription_html: strwith no default, so model construction fails immediately.nameis the only field that can be passed unconditionally.Suggested fix
I can open a PR with this one-line change if you'd like.
Note (may or may not be related)
After applying the fix locally,
doc create(anddoc ls) on a self-hosted Plane instance returnsHTTP 404: Page not foundfor both project pages and workspace pages endpoints. That may be a separate server-version issue, but flagging in case page support was removed/changed in newer Plane versions.