docs(openapi): clarify dataType-per-field-class and host/pathToMove rules (#36321)#36322
Closed
fmontes wants to merge 2 commits into
Closed
docs(openapi): clarify dataType-per-field-class and host/pathToMove rules (#36321)#36322fmontes wants to merge 2 commits into
fmontes wants to merge 2 commits into
Conversation
…ules (#36321) The MCP server builds payloads from openapi.yaml. Two doc gaps caused it to generate 400-failing requests: * POST /api/v1/contenttype: the field schema documented the dataType enum but not the per-field-class restriction, so image fields were sent dataType:SYSTEM and rejected. Document the field-class -> dataType mapping (ImageField/BinaryField=TEXT, etc.) in ContentTypeResource. * PUT /api/v1/workflow/.../fire/{systemAction}: setting host/folder on the contentlet is rejected by design (system fields are dropped by MapToContentletPopulator). The supported path is the top-level pathToMove property (Move actionlet). Surface this in the fire @operation description and enrich the BadRequestException message with a concrete pathToMove example. The guard itself is unchanged. openapi.yaml regenerated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
5 tasks
Contributor
|
Claude finished @fmontes's task in 1m 19s —— View job Rollback Safety Analysis
Result: Safe to Roll BackThe two commits in this PR touch only three files:
Analysis against all unsafe categories:
Conclusion: All changes are documentation-only (Swagger annotations + regenerated YAML) plus a minor enrichment of an error message string. No DB, ES, serialization, or API contract changes. Rolling back to N-1 is safe — no data transformation, no schema alteration, no client-breaking contract change. Label applied: |
Contributor
🤖 Bedrock Review —
|
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
🤖 Bedrock Review —
|
jcastro-dotcms
approved these changes
Jun 25, 2026
|
Tick the box to add this pull request to the merge queue (same as
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Fixes two OpenAPI documentation gaps that caused the MCP server (which builds request payloads from
openapi.yaml) to generate400-failing requests. Both are spec/annotation changes — no behavior change to the endpoints, and the existing workflow guard is left intact.Bug 1 —
POST /api/v1/contenttype: image fielddataTypeImage fields fail with
400 — Field Type:...ImageField does not accept datatype system_field:coverwhen sentdataType: SYSTEM.ImageField.acceptedDataTypes()is[TEXT]only; the field schema in the@RequestBodydocumented thedataTypeenum but not the per-field-class restriction, so the client guessedSYSTEM.ContentTypeResource@RequestBody: documents the field-class -> dataType mapping (ImageField/BinaryField->TEXT;TextArea/StoryBlock->LONG_TEXT;Custom->LONG_TEXT/TEXT;TextField->TEXT/LONG_TEXT/INTEGER/FLOAT).Bug 2 —
PUT /api/v1/workflow/.../fire/{systemAction}: location fieldsSetting
host/hostId/hostname/folderon the contentlet is rejected with400 — System fields [...] cannot be set via this endpoint. This guard is intentional (added in526132bbf7to surface silent-ignores — these fields are dropped byMapToContentletPopulator). The supported way to set/change location is the top-levelpathToMoveproperty (Move actionlet), which was documented in the body table but not surfaced where callers hit the error.WorkflowResourcefire@Operation: adds a note thathost/folderare rejected andpathToMoveis the supported mechanism, with an example.validateFireActionForm()BadRequestExceptionmessage: enriched with a concretepathToMoveexample. The guard logic is unchanged.openapi.yamlregenerated via./mvnw compile -pl :dotcms-core -DskipTests.Checklist
TEXT)@Operationdocuments host/folder rejection +pathToMoveopenapi.yamlregenerated and committedvalidateFireActionForm()left intactThis PR fixes #36321