Document publishing pipeline¶
DocumentPublishingPipeline.cs shows documentation-as-code publishing into the Okatana knowledge base.
The example creates a draft document linked to a project, sets caption/content/tags, records a review comment, and changes status to Published. A real pipeline can render Markdown to safe HTML before calling the SDK, validate links, attach a source revision marker, and publish only after repository approval checks pass.
Editors and project scope are validated by the server, and document content is sanitized. Keep the API credential separate from browser-user identities; the API actor is the integration principal.
Use tags such as runbook, production, and a service name to support later document filtering. If a publishing POST has an ambiguous result, search documents by a unique title/source marker before retrying.