Review a module’s style with a model
Asks the configured language model for style and consistency suggestions on one module of a change set: its working copy, else the file committed on its branch. Off by default: without a configured endpoint (CCMS_STYLE_REVIEW_URL) it is 404 not-configured and nothing is sent anywhere. What is sent: only the module’s translatable text (each block’s own text as plain text, by block ID) and the style guide in openfolia.yaml (styleGuide): no metadata, no comments, no other module. Nothing is stored; one module.style-review audit event records who asked, for which module, the outcome and how many suggestions (never the text). The suggestions are advice: each one names a block, a part and a range of its text; one that does not fit the module’s text is dropped (meta.dropped). Only the change set’s author, within their reading scope, as the working copy is read (403 for anyone else who holds content.read.draft; for anyone else another author’s change set is 404, exactly like a missing one). No body. Needs the content.edit permission (and content.read, which reading the module needs).
bearerAuthorizationBearer <JWT>A service account's token (ccms_sat_…, issued by POST /service-accounts/{id}/tokens), or, for local use and demo mode, the server's shared CCMS_API_TOKEN.
changeSetId*stringThe change set’s ID (a UUID). One that names no change set, malformed or not, is 404.
uuidlang*stringA language with subtags of 2 to 8 characters (en, pt-BR); any case. One that is not is 404.
moduleId*string^[a-z0-9]+(?:-[a-z0-9]+)*$length <= 100X-Ccms-User?stringDemo mode only (CCMS_AUTH_MODE=demo): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400).
application/vnd.api+json- body
application/vnd.api+json- response
data*curl -X POST 'http://localhost:3000/change-sets/497f6eca-6276-4993-bfeb-53cbbbba6f08/modules/en/battery-charging/style-review' \ -H 'Content-Type: application/vnd.api+json' \ -d '{}'{ "data": { "type": "StyleReview", "id": "string", "attributes": { "lang": "string", "moduleId": "string", "suggestions": [ { "id": "string", "blockId": "string", "field": "title", "range": { "start": 0, "end": 1 }, "original": "string", "message": "string", "replacement": "string", "rule": "model" } ] }, "meta": { "version": 0, "baseCommit": "string", "dropped": 0 } }}