Usage

Four kinds of people deal with this payload the developer of any Klok project whose documentation it carries the developers of the tools that produce it the developers of the services that read it and the person who runs the broker This page walks through what each one does Producers and consumers Project Role How klok framework klok gradle plugin producer publishKlokDocs scans the build and publishes on the documentation topic initDocsGeneration writes the same payload to build klok docs project documentation json klok application klok integration agent klok cli producer klok docs send publishes a repository s klok docs with no scan no routes sources configuration keys or solutions klok integration klok documentation egress consumer KLK007E1_DocumentationEgress consumes KlokProjectDocumentationV1_prepared and writes the project s documentation project klok application frontend klok dev consumer POST api integration context documentation called by the Gradle plugin s publishKlokContext turns the payload into nodes of the integration context graph klok cli reader klok docs verify reads the payload file a build wrote and checks it against klok docs Getting the model A Gradle project takes the Java artifact through the dependency catalog Refresh the project s copy commit and use the alias never type a version The classes are in The model is public so every release also goes to Maven Central and its TypeScript package is staged on npmjs org where a maintainer publishes it with two factor authentication klok cli depends on it The Python package is in this project s GitLab PyPI registry For the developer of a Klok project You do not build this payload by hand your pipeline publishes it on every build a Gradle integration project built from the Klok template runs in its job a datamodel runs in its generated Java project any other project includes which runs What you control is what goes into it the folder the README Javadoc on important components and the solution metadata Before a merge request look at what would be sent Keep the payload under 3 MB Above that it is not sent and your documentation is not updated see Size and claim check For the developer of a producer Wrap the payload in the CloudEvent described on the index page type Publish on of the documented repository s own tenant never another tenant s The environment is production unless names another installation a build has no deployment environment of its own Set and give every file its and mask every configuration value whose key looks like a credential Keep the two producers in step klok cli s follows the plugin s and encoding included For the developer of a receiver Take the tenant from the topic s namespace never from and refuse a payload about a repository of another tenant KlokDocumentationEgress does exactly this Derive the documentation project from with the naming rules do not trust Compare the of every entry with the previous run to find added changed and removed pages no against the source repository is needed Expect optional fields to be missing and were added after the first release and a payload from klok cli carries only and Refuse a payload with set until claim checks are implemented For the operator of the broker Documentation is a shared platform service and follows write narrow consume wide a tenant s CI broker client is granted on its own tenant s documentation topic and the documentation service is granted on it Today KlokDocumentationEgress reads only tenant klok s topic klok documentation egress#2 and another tenant has no documentation broker client yet klok environment setup#33 so only tenant klok s projects get documentation on docs klok dev The grants and broker clients are described in the framework development guide Broker Access And Tenant Isolation gradle klok libs versions toml gradlew updateKlokLibsToml dependencies implementation klokLibs klokProjectDocumentationV1 dev klok klok datamodel public_ klok_project_documentation_v1 @klok integration datamodel klok project documentation v1 klok datamodel klok project documentation v1 main gradlew publishKlokDocs publishKlokContext klok_docs_publish publishKlokDocs klok environment build ci templates klok docs send yml klok docs send klok docs @KlokDocs gradlew initDocsGeneration klok docs verify payload build klok docs project documentation json klok docs send dry run dev klok documentation project prepared persistent <tenant> _<env> common KlokProjectDocumentationV1_prepared KLOK_DOCS_ENVIRONMENT payloadSizeBytes payloadSha256 klokDocs sha256 send ts DocumentationPayloadBuilder KlokDocsCollector PayloadFile project tenant project repoPath docsRepoPath sha256 klokDocs git diff componentDocs referencedSourceRefs usedDatamodels project klokDocs claimCheck publish consume