Structure

The datamodel as the schema namespace defines it the root level first then every complex type in the order the root reaches it then the simple types A field whose type the schema defines links to its section schema definition xsd klok project documentation v1 xsd dev klok klok public

KlokProjectDocumentationV1

The root element holds one of the type the root level Field Type Cardinality Description specversion string 0 1 type string 0 1 dev klok documentation project prepared source string 0 1 id string 0 1 time dateTime 0 1 datacontenttype string 0 1 subject string 0 1 Complex field Type Cardinality Description data KlokProjectDocumentationPayloadType 0 1 This page documents the top level structure of the datamodel The root type acts as an envelope that conforms to the CloudEvents specification wrapping the actual documentation data within its field It ensures the message carries standard routing metadata alongside the heavy payload required for generating project documentation Simple Fields The fields listed here are primitive types used primarily for message identification classification and metadata They map directly to standard CloudEvents attributes Field Type Cardinality Description specversion string 0 1 The version of the CloudEvents specification which the event uses type string 0 1 Identifies the event type For this model the expected value is dev klok documentation project prepared source string 0 1 The context in which the event happened This usually identifies the system or component that produced the event id string 0 1 A unique identifier for the event instance time dateTime 0 1 A timestamp indicating when the event occurred datacontenttype string 0 1 A content type header that indicates how the data is encoded e g application json subject string 0 1 A description of this event providing subject specific information about the event and its content Complex Fields The following section describes the single complex field that carries the business payload of the documentation model data Type Cardinality 0 1 Description This field holds the actual content required to generate the project documentation It acts as the container for project metadata integration solutions route definitions source code references datamodel structures and configuration keys When this field is present it provides the complete context needed to reconstruct or update the documentation pages associated with a specific Klok project klok project documentation v1 KlokProjectDocumentationV1 data KlokProjectDocumentationPayloadType KlokProjectDocumentation_v1 KlokProjectDocumentation KlokProjectDocumentationV1

KlokProjectDocumentationPayloadType

Everything the documentation generation needs When claimCheck is set the heavy collections are empty and the same payload is stored in the blob store instead Used in KlokProjectDocumentationV1 Field Type Cardinality Description payloadSha256 string 0 1 payloadSizeBytes long 0 1 Complex field Type Cardinality Description project KlokProjectDocType 1 solutions KlokSolutionDocType 0 n routes KlokRouteDocType 0 n sources KlokSourceFileType 0 n dataModelDocs KlokDatamodelDocType 0 n klokDocs KlokDocsFileType 0 n configKeys KlokConfigKeyType 0 n attachments KlokAttachmentType 0 n claimCheck KlokClaimCheckRefType 0 1 componentDocs KlokComponentDocType 0 n Added 2026 09 29 The components annotated with @KlokDocs ordered by qualifiedName Heavy like routes empty when claimCheck is set usedDatamodels KlokDatamodelUseType 0 n Added 2026 09 30 The datamodels from jars that the routes are bound to ordered by qualifiedName empty in a datamodel project whose own classes are dataModelDocs The is the central container for all data required to generate project documentation It holds the project s metadata its solutions routes source files datamodel definitions documentation files and configuration keys This type acts as the primary data structure within When the field is populated this indicates that heavy collections like and have been offloaded to the platform s object storage blob store to keep the message small and the corresponding fields in this type will be empty project Type Complex Cardinality Required Description Holds the core metadata and identity of the project being documented This field is always present as it anchors the documentation to a specific project entity solutions Type Complex Cardinality Optional Repeated Description A list of integration solutions to which the project s routes belong Each entry represents a logical grouping of routes implementing a business flow routes Type Complex Cardinality Optional Repeated Description A list of Klok routes defined in the project Each route corresponds to a class extending a base class Note This is a heavy collection If is set this list will be empty and the data is stored externally sources Type Complex Cardinality Optional Repeated Description A list of source files included in the payload Files are stored once for the entire payload and are referenced elsewhere in the model by their dataModelDocs Type Complex Cardinality Optional Repeated Description A list of datamodels that the project either defines or uses Each entry includes the schema definition and when available the generated Java classes klokDocs Type Complex Cardinality Optional Repeated Description A list of files originating from the project s folder These are the hand written documentation files associated with the project configKeys Type Complex Cardinality Optional Repeated Description A list of configuration keys extracted from This captures the settings relevant to the project s runtime behavior attachments Type Complex Cardinality Optional Repeated Description A list of files located outside that are necessary for the documentation Examples include OpenAPI documents README files XSD schemas or Avro schemas claimCheck Type Complex Cardinality Optional Description A reference to the claim check URI where the heavy payload parts like and are stored in the object storage Interaction If this field is present the and lists in this object will be empty Developers must use the URI to retrieve the actual data from the blob store payloadSha256 Type Cardinality Optional Description The SHA 256 hash of the payload This is likely used to verify the integrity of the data stored via or to detect changes in the documentation payload payloadSizeBytes Type Cardinality Optional Description The size of the payload in bytes This provides metadata about the volume of documentation data useful for performance monitoring or storage management componentDocs Type Complex Cardinality Optional Repeated Description A list of components annotated with These are ordered by Note Like this is a heavy collection and will be empty if is set usedDatamodels Type Complex Cardinality Optional Repeated Description A list of datamodels from JAR files that the routes are bound to ordered by Context In a datamodel project this list is empty because the project s own classes are represented in instead KlokProjectDocumentationPayloadType KlokProjectDocumentationV1 data claimCheck routes componentDocs KlokProjectDocType 1 KlokSolutionDocType 0 n KlokRouteDocType 0 n dev klok framework patterns claimCheck KlokSourceFileType 0 n qualifiedName KlokDatamodelDocType 0 n KlokDocsFileType 0 n klok docs KlokConfigKeyType 0 n application properties KlokAttachmentType 0 n klok docs KlokClaimCheckRefType 0 1 routes componentDocs routes componentDocs string 0 1 claimCheck long 0 1 KlokComponentDocType 0 n @KlokDocs qualifiedName routes claimCheck KlokDatamodelUseType 0 n qualifiedName dataModelDocs data

KlokProjectDocType

Used in KlokProjectDocumentationPayloadType Field Type Cardinality Description tenant string 1 domain string 1 Business domain common for projects that are not owned by a business domain environment string 0 1 projectName string 1 projectType KlokProjectTypeType 1 projectVisibility string 0 1 projectVersion string 0 1 projectDescription string 0 1 tenantShortCode string 0 1 repoPath string 1 repoWebUrl string 0 1 gitServerHint string 0 1 Host of the source git server The receiver never contacts it this is for provenance only commitSha string 0 1 branch string 0 1 pipelineId string 0 1 pipelineUrl string 0 1 docsRepoPath string 1 Documentation project to write to always on the Klok GitLab even when the source is not docId string 1 docScope KlokDocScopeType 1 generatedAt dateTime 1 generatorVersion string 0 1 Version of klok gradle plugin that produced the payload This part identifies the project that documentation was generated from and the location where that documentation is to be written It sits within inside the root structure acting as the context for the specific document and its content Identity and Tenancy Fields These fields establish which organization business area and specific project the documentation belongs to Field Type Cardinality Description tenant string 1 The tenant identifier domain string 1 The business domain Use common for projects not owned by a specific business domain environment string 0 1 The deployment environment projectName string 1 The name of the project tenantShortCode string 0 1 A short code identifier for the tenant Project Metadata These fields describe the nature and visibility of the project Field Type Cardinality Description projectType KlokProjectTypeType 1 The category of the project Allowed values INTEGRATION DATAMODEL APPLICATION OTHER projectVisibility string 0 1 The visibility setting of the project projectVersion string 0 1 The version of the project projectDescription string 0 1 A textual description of the project Source Control Context These fields track where the source code and the generated documentation reside Note the distinction between the source server and the destination documentation server Field Type Cardinality Description repoPath string 1 The path to the source repository repoWebUrl string 0 1 The web URL of the source repository gitServerHint string 0 1 The host of the source git server This is for provenance only the receiver never contacts this host commitSha string 0 1 The commit hash of the source branch string 0 1 The branch of the source docsRepoPath string 1 The documentation project to write to This is always on the Klok GitLab even if the source repository is hosted elsewhere Pipeline and Generation Context These fields provide metadata about the automation process that created this documentation payload Field Type Cardinality Description pipelineId string 0 1 The identifier of the CI CD pipeline pipelineUrl string 0 1 The URL of the CI CD pipeline run generatedAt dateTime 1 The timestamp when the payload was generated generatorVersion string 0 1 The version of the klok gradle plugin that produced this payload Documentation Specifics These fields define the specific document being referenced and its intended scope on the portal Field Type Cardinality Description docId string 1 The unique identifier of the document docScope KlokDocScopeType 1 The visibility scope of the documentation on the portal This is derived from the repository path Allowed values GLOBAL TENANT DOMAIN SYSTEM KlokProjectDocumentationPayloadType project KlokProjectDocumentation docId project

KlokSolutionDocType

The integration solution the routes of this project belong to The registry in git owns the number this is what the project claims Used in KlokProjectDocumentationPayloadType Field Type Cardinality Description solutionKey string 1 TENANTSHORT plus three digits for example ACME001 solutionNumber int 0 1 tenantShortCode string 0 1 name string 0 1 slug string 0 1 informationDomain string 0 1 businessContext string 0 1 serviceLevelRequirements string 0 1 dataModelContext string 0 1 hldPath string 0 1 hldMarkdown string 0 1 routeIds string 0 n Route ids in this project that implement the solution declaredIn KlokSolutionDeclaredInType 1 This section describes the complex type which represents a single integration solution within a project s documentation This type is embedded within the field of the effectively linking the technical routes of a project to the business or architectural solution they implement The schema notes that while the solution registry in Git owns the canonical number this structure reflects what the specific project claims to be implementing Field Descriptions The type consists of fourteen fields Most are optional allowing a project to provide metadata incrementally but and are mandatory to identify and verify the solution s origin Field Type Cardinality Description solutionKey string 1 The unique identifier for the solution The format is the tenant s short code followed by three digits e g ACME001 This field is required solutionNumber integer 0 1 The numeric part of the solution identifier if provided separately from the key tenantShortCode string 0 1 The short code of the tenant that owns this solution name string 0 1 The human readable name of the solution slug string 0 1 A URL friendly or code friendly identifier for the solution informationDomain string 0 1 The business information domain this solution belongs to businessContext string 0 1 A description of the business context or problem the solution addresses serviceLevelRequirements string 0 1 Text describing the SLAs associated with this solution dataModelContext string 0 1 Context regarding the data models used or affected by this solution hldPath string 0 1 A file path pointing to the High Level Design document for this solution hldMarkdown string 0 1 The content of the High Level Design in Markdown format routeIds string 0 n A list of route identifiers within the current project that implement parts of this solution This field is optional but can contain multiple entries declaredIn KlokSolutionDeclaredInType 1 An enumeration indicating how the solution key was determined or declared This field is required See the section below for details The declaredIn Enumeration The field is an enumeration of type It indicates the source of authority for the The schema specifies that these values are listed in falling order of authority meaning is the most authoritative source Value Meaning SOLUTION_META The solution key is defined in dedicated solution metadata files which is considered the highest authority GRADLE The solution key is defined within the project s Gradle build configuration ROUTE_NAME The solution key is inferred or extracted from the naming convention of the routes themselves This is the lowest authority level Relationships and Constraints The structure enforces a clear distinction between identification and implementation The is the primary anchor required for every entry The field is also required ensuring that every solution declaration carries metadata about its source of truth which aids in conflict resolution if multiple sources claim the same key The field provides the link between the business level solution definition and the technical implementation within the project It is a repeated field allowing a single solution to be implemented by many routes or for a project to list routes associated with that solution There is no explicit mutual exclusion choice defined between the descriptive fields like vs implying that a project could theoretically provide both a path and inline content though typically one or the other might be used depending on whether the documentation is externalized or inline KlokSolutionDocType solutions KlokProjectDocumentationPayloadType solutionKey declaredIn declaredIn KlokSolutionDeclaredInType solutionKey SOLUTION_META solutionKey declaredIn routeIds 0 n hldPath hldMarkdown solutions

KlokRouteDocType

One Klok route one class extending a dev klok framework patterns base class The class name is the route id Used in KlokProjectDocumentationPayloadType Field Type Cardinality Description id string 1 Fully qualified class name name string 1 Simple class name which is the route id packageName string 0 1 klokRouteBuilderType string 0 1 Fully qualified name of the pattern base class for example dev klok framework patterns KlokOnrampRoute Same meaning as the field of the same name in KlokProjectBuildEventV1 klokRouteBuilderSimpleName string 0 1 Simple name of the pattern base class for headings and prose legId string 0 1 The TENANTSHORT NNN LEG seq part of the route id legType KlokLegTypeType 0 1 solutionKey string 0 1 javadoc string 0 1 sourceRef string 1 qualifiedName of this class in sources superClassRef string 0 1 processingPatternRefs string 0 n Capability interfaces from dev klok framework patterns that the route implements subRouteRefs string 0 n Qualified names of the project s other routes this route calls through their direct URI a class literal of the route directUriOf X class subRoute X class a REST operation s handler in this route s class or since 2026 09 30 in a project class the route references one level deep as referencedSourceRefs The reverse which routes call a route is what the documentation shows as used by dataModelRefs string 0 n The datamodels bound as type arguments of the pattern base class in its parameter order Since 2026 09 30 also for a route that extends the pattern through base classes of its own type variables are resolved down the class chain and for a pattern without type parameters KlokSubRoute they are the concrete type arguments of the nearest generic base class consumesTopics string 0 n publishesTopics string 0 n referencedSourceRefs string 0 n Added 2026 09 29 qualifiedNames in sources of the project s own top level types this route references anywhere in its class body included one level deep not the route itself other routes or types from jars The documentation gives them to the route s AI prompts as context annotated with @KlokDocs or not Capped by the producer see the klok gradle plugin documentation Complex field Type Cardinality Description relatedTypes KlokRelatedTypeDocType 0 n mcpTool KlokMcpToolDocType 0 1 Added 2026 10 27 The MCP tool this route is when it is a KlokRestApiHandlerRoute annotated @KlokMcpTool klok quarkus extension page MCP tools Missing for every other route is the documentation record for a single Camel route on the Klok platform It describes the Java class that implements the route its position within the projects architecture such as which leg it belongs to and its connections to other system components like topics datamodels and sub routes Within the schema instances of this type are collected in the field of Core Identity and Source References These fields identify the specific Java class representing the route and link it back to the source code Field Type Cardinality Description id string 1 The fully qualified class name of the route for example com klok myproject MyRoute name string 1 The simple class name of the route This value serves as the route id packageName string 0 1 The Java package in which the route class is defined sourceRef string 1 The qualifiedName of this class within the projects sources array linking the documentation entry to the specific source code entry superClassRef string 0 1 The qualifiedName of the superclass referencing the source entry of the base class the route extends Route Patterns and Classification These fields describe the role of the route within the platforms integration patterns Field Type Cardinality Description klokRouteBuilderType string 0 1 The fully qualified name of the pattern base class the route extends For example dev klok framework patterns KlokOnrampRoute This has the same meaning as the field of the same name in KlokProjectBuildEventV1 klokRouteBuilderSimpleName string 0 1 The simple name of the pattern base class for example KlokOnrampRoute This is intended for use in headings and prose legId string 0 1 The TENANTSHORT NNN LEG seq part of the route id legType KlokLegTypeType 0 1 The leg letter extracted from the route id solutionKey string 0 1 The key identifying the solution business flow this route implements processingPatternRefs string 0 n A list of capability interfaces from dev klok framework patterns that this route implements is an enumeration with the following allowed values corresponding to the leg letter in the route id I Ingress P Processing E Egress A API S Sub route T Timer Data Binding and Topic Interactions These fields map the route to the data models it handles and the message topics it interacts with Field Type Cardinality Description dataModelRefs string 0 n The datamodels bound as type arguments to the pattern base class listed in the parameter order of that class Since 2026 09 30 this also resolves for routes that extend patterns through their own intermediate base classes type variables are resolved down the class chain For patterns without type parameters such as KlokSubRoute these are the concrete type arguments of the nearest generic base class consumesTopics string 0 n A list of topics the route consumes messages from publishesTopics string 0 n A list of topics the route publishes messages to Route Relationships and Sub Routes These fields define how this route relates to other routes and types within the project Field Type Cardinality Description subRouteRefs string 0 n The qualified names of other routes in the same project that this route calls via direct URIs This includes calls made through class literals directUriOf X class subRoute X class or REST operation handlers within this routes class Since 2026 09 30 this also includes calls made in project classes referenced by this route tracked one level deep as referencedSourceRefs The reverse of this relationship which routes call this route is displayed in documentation as used by referencedSourceRefs string 0 n Added 2026 09 29 The qualifiedNames of top level project types excluding the route itself other routes or types from external jars that this route references anywhere in its class body This data is provided to the routes AI prompts as context regardless of whether the referenced types are annotated with @KlokDocs The list is capped by the producer refer to the klok gradle plugin documentation for limits relatedTypes KlokRelatedTypeDocType 0 n Complex types related to this route The specific structure is defined in KlokRelatedTypeDocType API and MCP Tool Metadata These fields are present only for specific types of routes Field Type Cardinality Description javadoc string 0 1 The Javadoc comment associated with the route class mcpTool KlokMcpToolDocType 0 1 Added 2026 10 27 Details the Model Context Protocol MCP tool this route exposes This field is present only if the route is a KlokRestApiHandlerRoute annotated with @KlokMcpTool It is missing for all other route types Inter field Relationships in the Schema The schema reveals several strict connections between fields The and fields are intrinsically linked is the fully qualified name while is the simple class name portion of that same identifier The also serves as the unique route id within the platform and act as foreign keys pointing to entries in the parent array allowing the documentation to link route metadata directly back to the source code definition relies on the inheritance hierarchy defined by and If the base class is generic the references are the bound types if the base class is non generic like the schema dictates that these refs resolve to the generic arguments of the nearest generic ancestor KlokRouteDocType klok project documentation v1 routes KlokProjectDocumentationPayloadType KlokLegTypeType INGRESS PROCESSING EGRESS API SUBROUTE TIMER UNKNOWN id name id name name sourceRef superClassRef sources dataModelRefs klokRouteBuilderType superClassRef KlokSubRoute routes

KlokSourceFileType

One source file stored once for the whole payload and referenced by qualifiedName Used in KlokProjectDocumentationPayloadType Field Type Cardinality Description qualifiedName string 1 simpleName string 0 1 packageName string 0 1 origin KlokSourceOriginType 1 artifact string 0 1 Maven coordinates of the jar the source came from empty for PROJECT relativePath string 0 1 sha256 string 0 1 encoding KlokDocEncodingType 0 1 sourceCode string 0 1 A represents a single source code file within the datamodel It acts as a structural container for file metadata and content allowing the same file to be stored once in the collection of and referenced elsewhere by its unique identifier the Field Reference The following table details each field its type cardinality and meaning based on the schema definitions Field Type Cardinality Description qualifiedName string 1 The unique identifier for the file Other parts of the model reference this file by this value No schema documentation provided simpleName string 0 1 The name of the file without its path or extension No schema documentation provided packageName string 0 1 The package namespace the file belongs to No schema documentation provided origin KlokSourceOriginType 1 Indicates where the source file was originally read from See KlokSourceOriginType below artifact string 0 1 The Maven coordinates of the jar from which the source originated This field should be empty if the origin is PROJECT relativePath string 0 1 The path of the file relative to its root source No schema documentation provided sha256 string 0 1 A hash or checksum of the file content No schema documentation provided encoding KlokDocEncodingType 0 1 Specifies how the content in the sourceCode field is encoded See KlokDocEncodingType below sourceCode string 0 1 The actual content of the file The interpretation of this string depends on the encoding field No further schema documentation provided KlokSourceOriginType This enumeration defines the provenance of the source file It is mandatory cardinality 1 Value Meaning PROJECT The source file is part of the current project being documented FRAMEWORK_JAR The source file came from a framework jar DATAMODEL_JAR The source file came from a datamodel jar DEPENDENCY_JAR The source file came from a general dependency jar KlokDocEncodingType This enumeration defines how the data in the field is encoded It is optional cardinality 0 1 Value Meaning NONE The content is plain text BASE64 The content is binary data encoded as Base64 GZIP_BASE64 The content is large text compressed with Gzip and then encoded as Base64 Structural Relationships Uniqueness and Reference The is the primary key for this type within the context of the list Developers should map this field carefully to ensure consistent referencing throughout the payload Origin and Artifact Dependency The schema explicitly states that the field contains Maven coordinates and should be empty for the origin This implies that if is or the field is expected to hold the coordinates Content Encoding Coupling The field is a plain but its semantic meaning changes based on the field If is is the raw text If is must be decoded to bytes If is must be Base64 decoded and then Gzip decompressed to retrieve the text If is omitted null empty the default interpretation is not explicitly defined in the schema text provided but is the most common default for text sources Tip When mapping data to ensure is consistently generated to prevent duplicate entries in the collection KlokSourceFileType klok project documentation v1 sources KlokProjectDocumentationPayloadType qualifiedName origin sourceCode encoding qualifiedName sources artifact PROJECT origin FRAMEWORK_JAR DATAMODEL_JAR DEPENDENCY_JAR artifact sourceCode string encoding encoding NONE sourceCode encoding BASE64 sourceCode encoding GZIP_BASE64 sourceCode encoding NONE KlokSourceFileType qualifiedName sources sources

KlokDatamodelDocType

A datamodel the project defines or uses with its schema and generated class when available Used in KlokProjectDocumentationPayloadType Field Type Cardinality Description name string 1 qualifiedName string 0 1 majorVersion int 0 1 version string 0 1 scopeType string 0 1 common public domain or system domain string 0 1 repoPath string 0 1 artifact string 0 1 description string 0 1 sourceRef string 0 1 Generated Java class in sources schemaPath string 0 1 Path of the XSD or Avro schema in attachments This section describes a structure representing a single datamodel definition or usage within a project It serves as a component within capturing the technical metadata scope and references necessary to identify and locate the datamodel s source and generated artifacts Name Type Cardinality Required Description This field holds the basic name of the datamodel As the only required field it acts as the primary identifier for the datamodel document within the context of the project documentation Qualified Name Type Cardinality Optional Description This field holds the fully qualified name of the datamodel The schema does not specify the exact format e g package prefix but it implies a more specific identifier than the basic Major Version Type Cardinality Optional Description This field holds the major version number of the datamodel as an integer It typically corresponds to the version suffix often seen in datamodel names e g the in Version Type Cardinality Optional Description This field holds the full version string of the datamodel This likely captures the precise version identifier which may include more granularity than the integer Scope Type Type Cardinality Optional Description This field indicates the scope or accessibility level of the datamodel within the Klok platform architecture Allowed Values Meaning common The datamodel is shared across the tenant s domains public The datamodel is open to anyone domain The datamodel belongs to a specific business area system The datamodel models a specific external system Domain Type Cardinality Optional Description This field holds the specific business area associated with the datamodel This is particularly relevant when is set to as domains are business areas inside a tenant Repo Path Type Cardinality Optional Description This field holds the path to the repository where the datamodel is defined Since public common and domain datamodels are XSD schemas in a Git project of their own this likely points to that source repository Artifact Type Cardinality Optional Description This field holds the artifact identifier for the datamodel This likely refers to the build artifact such as a JAR or Maven artifact that contains the generated Java Python or TypeScript classes associated with this datamodel Description Type Cardinality Optional Description This field holds a human readable description of the datamodel The schema does not restrict the format allowing for standard documentation text Source Ref Type Cardinality Optional Description This field holds a reference to the generated Java class Tip The schema notes specify that this value is found in Do not guess the format of the reference it acts as a link or identifier pointing to the source code representation Schema Path Type Cardinality Optional Description This field holds the path to the schema definition file Tip The schema notes specify that this value is found in It points to either the XSD or Avro schema file that defines the structure of this datamodel KlokDatamodelDocType KlokProjectDocumentationPayloadType dataModelDocs string 1 string 0 1 name int 0 1 1 CustomerV1 string 0 1 majorVersion string 0 1 string 0 1 scopeType domain string 0 1 string 0 1 string 0 1 string 0 1 sources string 0 1 attachments dataModelDocs

KlokDocsFileType

One file from the project s klok docs folder path is relative to that folder Used in KlokProjectDocumentationPayloadType Field Type Cardinality Description path string 1 contentType string 0 1 sha256 string 1 Hash of the decoded bytes The receiver diffs these against its own state to find changed pages sizeBytes long 0 1 encoding KlokDocEncodingType 1 content string 1 KlokDocsFileType Overview The represents a single documentation file located within a project s directory It is part of the structure The field is relative to the folder root allowing the system to locate and manage individual files within the documentation tree Field Definitions Each field in serves a specific purpose for identifying describing and transporting the file content Field Type Cardinality Description path string 1 Required The relative path of the file from the klok docs folder root contentType string 0 1 Optional The MIME type or content category of the file e g text markdown image png sha256 string 1 Required The SHA 256 hash of the decoded file bytes Receivers use this value to detect changes by comparing it against their local state sizeBytes long 0 1 Optional The size of the file in bytes encoding KlokDocEncodingType 1 Required Indicates how the data in the content field is encoded See Encoding Strategy below content string 1 Required The actual file data formatted according to the specified encoding Encoding Strategy The relationship between the and fields is critical for correctly interpreting the file data The field is an enumeration that dictates how the string should be processed Warning The hash is calculated on the decoded bytes not the raw string You must decode the according to the type before verifying or computing the hash The allowed values for and their effect on are Encoding Value Content Interpretation Typical Use Case NONE The content string contains the raw plain text data Text files e g Markdown plain text BASE64 The content string is a Base64 encoded representation of the binary bytes Binary files e g images PDFs GZIP_BASE64 The content string is a Base64 encoded GZIP compressed representation of the text bytes Large text files where compression reduces payload size Data Consistency Notes Tip When mapping data to or from ensure that always reflects the hash of the final decoded file content regardless of the transport encoding Hash Verification Since is based on decoded bytes clients must decode the field using the algorithm specified in before comparing hashes Path Relativity All values are relative to the directory Absolute paths or paths starting with should be avoided or handled with care depending on the receiving system s security policies Content vs Metadata and are metadata hints The field holds the truth for the file s data while provides a verifiable fingerprint of that data KlokDocsFileType klok docs KlokProjectDocumentationPayloadType klokDocs path klok docs KlokDocsFileType encoding content encoding KlokDocEncodingType content sha256 content content encoding encoding content KlokDocsFileType sha256 sha256 content encoding path klok docs sizeBytes contentType content sha256 klokDocs

KlokConfigKeyType

A key from application properties Values are masked when the key looks like a secret Used in KlokProjectDocumentationPayloadType Field Type Cardinality Description key string 1 value string 0 1 masked boolean 1 routeId string 0 1 Set when the key is prefixed with a route id as the framework convention requires comment string 0 1 This type represents a single configuration entry drawn from capturing the key its optional value and masking status It acts as a leaf node within the structure specifically collected into the list of the Field Breakdown The following fields define the structure of a single configuration key entry Note that while the schema provides specific documentation for other fields are described primarily by their names and types with masking behavior governed by the type level description Field Type Cardinality Description & Behavior key string 1 The literal property key name This field is mandatory as it identifies the configuration setting value string 0 1 The configuration value associated with the key It is optional likely because the value may be masked empty or not applicable in certain documentation contexts masked boolean 1 Indicates whether the value has been obscured Per the type description values are masked when the key looks like a secret this boolean reflects that state explicitly routeId string 0 1 The identifier of the route if the configuration key follows the framework convention of being prefixed with a route ID This is optional present only when the key is scoped to a specific route comment string 0 1 An arbitrary comment or note attached to the configuration key for additional context Schema Relationships and Logic Context This type is exclusively used as an element within the collection of It does not stand alone as a root element Masking Logic The relationship between and is functional The flag provides the consumer with immediate knowledge of whether the string represents the actual secret data or a redacted placeholder based on the nature of the Route Scoping The field acts as a contextual qualifier Its presence signals that the and consequently the and status applies specifically to that route distinguishing it from global application configuration The schema notes that this corresponds to a specific framework convention for prefixing keys application properties KlokProjectDocumentation configKeys KlokProjectDocumentationPayloadType routeId configKeys KlokProjectDocumentationPayloadType key value masked masked value key routeId key value masked configKeys

KlokAttachmentType

A file outside klok docs that the documentation needs openapi document README XSD or Avro schema Used in KlokProjectDocumentationPayloadType Field Type Cardinality Description path string 1 kind string 0 1 openapi readme xsd avro system project solution meta other contentType string 0 1 sha256 string 0 1 sizeBytes long 0 1 encoding KlokDocEncodingType 1 content string 1 A represents a single file external to the folder that is required by the project documentation such as an OpenAPI specification a README or an XSD Avro schema It sits within the list of the and encapsulates both the metadata describing the file like its path and kind and its actual content along with the encoding method used to transmit that content Field Definitions The following fields define the structure of a Note that path encoding and content are mandatory Field Type Cardinality Description and Allowed Values path string 1 The file path or identifier where the attachment is located kind string 0 1 The classification of the attachment Allowed values openapi readme xsd avro system project solution meta other contentType string 0 1 The MIME type of the attachment e g application json text plain sha256 string 0 1 The SHA 256 hash of the attachment content used for verification sizeBytes long 0 1 The size of the attachment in bytes encoding KlokDocEncodingType 1 The method used to encode the content field See Encoding Logic below content string 1 The actual payload of the file encoded according to the encoding field Encoding Logic The encoding field determines how the content field must be interpreted The schema defines three specific states for NONE The content is plain text BASE64 The content is binary data encoded in Base64 GZIP_BASE64 The content is large text that has been compressed GZIP and then encoded in Base64 Structural Relationships Dependency between Encoding and Content The content field is only meaningful when interpreted through the lens of the encoding field A developer mapping data must ensure that if encoding is set to or the content string contains the respective encoded representation not raw text Classification via Kind The kind field provides semantic context for the path and contentType While optional it allows consumers of the datamodel to quickly identify the purpose of the attachment e g distinguishing an definition from an schema without parsing the entire content or relying solely on the file extension in path KlokAttachmentType klok docs attachments KlokProjectDocumentationPayloadType KlokAttachmentType KlokDocEncodingType BASE64 GZIP_BASE64 openapi xsd attachments

KlokClaimCheckRefType

Used in KlokProjectDocumentationPayloadType Field Type Cardinality Description bucket string 1 key string 1 scope KlokClaimCheckScopeType 0 1 sha256 string 1 sizeBytes long 1 contentType string 0 1 fileName string 0 1 encoding KlokDocEncodingType 0 1 expiresAt dateTime 0 1 storageEndpointHint string 0 1 uri string 0 1 The klokcc text form of this reference A is a structured reference that points to a large payload stored externally in the platform s object storage rather than embedding the payload bytes directly in the message It sits within the field serving as the mechanism to separate heavy data like files or documents from the lightweight business message flow following the claim check pattern Required Reference Fields These fields are mandatory cardinality 1 and provide the essential coordinates to locate and verify the object in the store Field Type Description bucket string The name of the storage bucket where the object is stored key string The unique key or path within the bucket that identifies the specific object sha256 string The SHA 256 hash of the payload used for integrity verification sizeBytes long The size of the payload in bytes Warning Do not attempt to read the payload directly from these fields they contain metadata and references only Optional Context Fields These fields cardinality 0 1 provide additional context about the payload or hints for processing but they are not required for basic identification Field Type Description contentType string The MIME type of the stored content if known fileName string The original name of the file if applicable encoding KlokDocEncodingType Specifies how the content was encoded during transfer Allowed values NONE for text BASE64 for binary GZIP_BASE64 for large text scope KlokClaimCheckScopeType Defines the lifecycle or visibility scope of the claim check Allowed values TMP PERM expiresAt dateTime An optional timestamp indicating when the reference or the underlying object may expire storageEndpointHint string A hint for the specific storage endpoint potentially used in multi region or specific tenant configurations uri string The klokcc text form of this reference This is a convenience representation of the combined bucket key and potentially other routing information into a single URI string Structural Relationships URI vs Components The field is an optional text representation of the reference The and are the structured authoritative components Developers should primarily rely on the structured fields for programmatic access treating the as a derived or transport friendly string Encoding Logic The field directly influences how the actual payload data referenced by and should be interpreted if it is not stored raw implies raw text while or implies specific transformations have been applied Scope Implication The field or likely dictates retention policies or visibility rules within the platform s storage layer although the exact behavior is determined by the platform implementation rather than the schema itself KlokClaimCheckRefType KlokProjectDocumentationPayloadType claimCheck uri bucket key sha256 sizeBytes uri encoding bucket key NONE BASE64 GZIP_BASE64 scope TMP PERM claimCheck

KlokComponentDocType

Added 2026 09 29 A project class or package annotated with @dev klok framework common docs KlokDocs an important component that is not a route such as central configuration a shared mapper or domain logic used by several routes It gets its own documentation page Used in KlokProjectDocumentationPayloadType Field Type Cardinality Description qualifiedName string 1 Fully qualified name of the type or the package name for a PACKAGE simpleName string 0 1 kind KlokComponentKindType 1 summary string 0 1 The annotation s summary empty when not given chapter string 0 1 The annotation s chapter empty means the standard components chapter javadoc string 0 1 sourceRef string 0 1 qualifiedName of the entry in sources empty for a PACKAGE or when the source is over the producer s size cap memberSignatures string 0 n Public members as one line each for example public static KlokDocumentationConfigV1 get for a PACKAGE the public types it declares usedBy string 0 n Route ids simple class names whose class references this component A represents a single documented software component within a Klok project such as a specific Java class record or package This component must be explicitly annotated with to qualify for inclusion It sits within the field of the serving as the metadata container for generating dedicated documentation pages for these components Developers use this type to map structural information including the component s identity its summary source code references and its usage relationships with other parts of the system Fields qualifiedName Type Cardinality Required 1 Description Holds the fully qualified name of the class record enum or interface If the component is this field contains the package name instead simpleName Type Cardinality Optional 0 1 Description Contains the simple name of the component typically the unqualified class name The schema does not provide further documentation for this field kind Type Cardinality Required 1 Description Specifies the nature of the documented component The allowed enumeration values are and Note that Java annotation types are reported as summary Type Cardinality Optional 0 1 Description Holds the summary text provided in the annotation If no summary was given in the annotation this field will be empty chapter Type Cardinality Optional 0 1 Description Indicates the chapter where this component s documentation should be placed as defined by the annotation An empty value signifies that the component belongs to the standard components chapter javadoc Type Cardinality Optional 0 1 Description Contains the Javadoc text associated with the component The schema does not provide further documentation for this field sourceRef Type Cardinality Optional 0 1 Description Holds the that acts as a reference to an entry in the collection This field is empty if the component is a or if the source code exceeds the producer s size cap memberSignatures Type repeated Cardinality Optional 0 n Description A list of strings where each entry represents one public member of the component For classes these are formatted as single line signatures e g For packages these entries represent the public types declared within that package usedBy Type repeated Cardinality Optional 0 n Description A list of route identifiers simple class names indicating which routes reference this component This establishes a usage link between the component and the routes that depend on it Field Relationships and Structure The fields in form a specific structure for documentation generation Identity Grouping The combination of and uniquely identifies the component and determines how it should be categorized e g as a or Annotation Mapping The and fields are direct mappings from the annotation attributes Their behavior is coupled with the requirement that the component must be annotated Reference Integrity The field creates a link to external source data It is conditional on the empty for and internal system limits size cap Usage Tracking The field provides a reverse dependency view listing the routes that consume this component which helps in understanding the component s impact within the larger application architecture KlokComponentDocType @dev klok framework common docs KlokDocs componentDocs KlokProjectDocumentationPayloadType string kind PACKAGE string KlokComponentKindType CLASS RECORD ENUM INTERFACE PACKAGE INTERFACE string @KlokDocs string string string qualifiedName sources PACKAGE string public static KlokDocumentationConfigV1 get string KlokComponentDocType qualifiedName simpleName kind CLASS PACKAGE summary chapter @KlokDocs sourceRef kind PACKAGE usedBy componentDocs

KlokDatamodelUseType

Added 2026 09 30 A datamodel the project s routes are bound to their dataModelRefs and where the datamodel is documented so the documentation can link to it and list on the datamodel s own pages where it is used The producer reads the origin from the Klok metadata in the datamodel s jar META INF klok datamodel properties written by the Klok Gradle plugin when the datamodel is built a class from a jar without it has no repoPath docsRepoPath or docId Used in KlokProjectDocumentationPayloadType Field Type Cardinality Description qualifiedName string 1 simpleName string 0 1 artifact string 0 1 Maven coordinates group name version of the jar the class came from the version this project was built with repoPath string 0 1 The datamodel s GitLab repository path without a leading slash docsRepoPath string 0 1 The datamodel s documentation project without a leading slash docId string 0 1 The datamodel s documentation id on docs klok dev usedBy string 0 n Route ids simple class names bound to the datamodel in name order This type represents a single data model that the project s routes are bound to It serves to link the technical definition of the data model via Maven coordinates and Git paths with its documentation on and to list exactly which routes use it You will find instances of this type inside the collection of The metadata here like and is read automatically by the producer from the data model s jar file if this file is missing these fields will be absent qualifiedName This field holds the fully qualified Java class name of the data model It is the primary identifier for the type within the documentation structure Property Value Type string Cardinality 1 Required Documentation simpleName This field holds just the class name of the data model without the package structure Property Value Type string Cardinality 0 1 Optional Documentation artifact This field holds the Maven coordinates of the jar file containing the data model class This version indicates specifically what the project was built against Property Value Type string Cardinality 0 1 Optional Documentation Maven coordinates group name version of the jar the class came from the version this project was built with repoPath This field holds the GitLab repository path for the data model It does not include a leading slash Note that this field is only present if the data model jar contains the required Klok metadata otherwise it is absent Property Value Type string Cardinality 0 1 Optional Documentation The datamodel s GitLab repository path without a leading slash docsRepoPath This field holds the GitLab repository path for the data model s documentation project Like it does not include a leading slash Property Value Type string Cardinality 0 1 Optional Documentation The datamodel s documentation project without a leading slash docId This field holds the unique identifier used to reference the data model s documentation on Property Value Type string Cardinality 0 1 Optional Documentation The datamodel s documentation id on docs klok dev usedBy This field lists the route IDs which are the simple class names of the Java classes that are bound to this data model The list is sorted in name order It is a repeated field meaning a single data model can be used by multiple routes Property Value Type string Cardinality 0 n Repeated Documentation Route ids simple class names bound to the datamodel in name order Relationships and Presence Logic The schema and its notes establish a clear distinction between technical identification and documentation metadata is always present and acts as the anchor for the entry is always relevant if the class comes from a jar providing the build time version and are strictly linked to the presence of Klok metadata in the source jar If a developer maps data from a jar that lacks these three fields will not be populated connects the abstract data model definition back to the concrete implementation details the routes within the project docs klok dev usedDatamodels KlokProjectDocumentationPayloadType repoPath docId META INF klok datamodel properties group name version repoPath docs klok dev qualifiedName artifact repoPath docsRepoPath docId META INF klok datamodel properties usedBy usedDatamodels

KlokRelatedTypeDocType

Used in KlokRouteDocType Field Type Cardinality Description qualifiedName string 1 simpleName string 0 1 relation string 0 1 field constructorParameter methodReturn methodParameter with a TypeArgument suffix when reached through a generic sourceRef string 0 1 qualifiedName of the entry in sources when the source was resolvable A describes a single data type that is connected to a specific route capturing its identity its structural relationship to the route and a pointer to its source definition It serves as a list item within the collection of a acting as the connector between a route and the other types it references or uses qualifiedName This field holds the fully qualified name of the related data type Type Cardinality 1 Required Documentation None Developer Note Since there is no documentation use this field to uniquely identify the type across the model It likely follows standard Java package and class naming conventions e g simpleName This field holds the unqualified name of the related data type Type Cardinality 0 1 Optional Documentation None Developer Note This appears to be a convenience field for display or short referencing distinct from the If is would likely be It may be null if not explicitly provided by the mapping logic relation This field describes how the related type connects to the parent route or method signature Type Cardinality 0 1 Optional Allowed Values The schema notes specify the following base values The type is used as a class field The type is used as a parameter in a constructor The type is returned by a method The type is passed as a parameter to a method Note The schema also states that a suffix is added when the type is reached through a generic e g Documentation The schema notes explicitly list these values and the suffix rule sourceRef This field holds a reference to the actual source code definition of the type if available Type Cardinality 0 1 Optional Documentation qualifiedName of the entry in sources when the source was resolvable Developer Note Do not treat this as a URL or file path It is a string key that matches an entry in the collection of the enclosing documentation structure If the source cannot be resolved this field will likely be absent or null Relationship Logic The schema provides limited structural constraints but the field names and cardinalities suggest the following logic for developers mapping this data Identification vs Reference is the primary identifier of the type itself is a secondary reference pointing to where that type is defined likely in a separate list elsewhere in the document Optional Context Both and are optional A consumer of this data model should not assume is always present even if is Enumeration Safety When validating or generating code based on ensure handling for the dynamic suffix mentioned in the schema notes as it creates compound values not strictly listed as separate enum constants but derived from the base ones KlokRelatedTypeDocType relatedTypes KlokRouteDocType string com example model MyRequest string qualifiedName qualifiedName com example model MyRequest simpleName MyRequest string field constructorParameter methodReturn methodParameter TypeArgument methodParameter_TypeArgument string sources qualifiedName sourceRef sources simpleName relation relation qualifiedName relation TypeArgument relatedTypes

KlokMcpToolDocType

Added 2026 10 27 One MCP tool a REST operation whose handler is annotated @KlokMcpTool as the application s MCP server lists it The name and the description are what a model reads to decide whether to call the tool Used in KlokRouteDocType Field Type Cardinality Description name string 1 The tool name snake_case noun_verb for example odl_get_object description string 1 What the tool does and when to use it as the model reads it write boolean 1 True when the tool changes something @KlokMcpTool write true enabledByDefault boolean 1 Whether the tool is registered without configuration true for a tool that only reads false for one that writes which needs RouteId mcp enabled true enabledKey string 0 1 The configuration key that switches the tool on or off RouteId mcp enabled httpMethod string 0 1 GET POST PUT or DELETE the verb of the REST operation the tool calls operationPath string 0 1 The full path of the REST operation for example api odl type id apiRouteRef string 0 1 Qualified name of the KlokRestApi in sources that declares the operation readOnlyHint boolean 0 1 destructiveHint boolean 0 1 idempotentHint boolean 0 1 replyTypeRef string 0 1 Qualified name of the reply type whose JSON is the tool s answer Complex field Type Cardinality Description arguments KlokMcpToolArgumentDocType 0 n This section details the complex type within the datamodel It represents a single Model Context Protocol MCP tool exposed by an application describing how an external model or agent interacts with the underlying REST operation Overview of KlokMcpToolDocType A instance documents one MCP tool which corresponds to a REST operation whose handler is annotated with This type sits within the structure under the field The and fields are critical as they form the information an AI model reads to decide whether to invoke the tool Field Definitions The following table details each field within the complex type including its data type cardinality and semantic meaning derived from the schema documentation Field Type Cardinality Description and Constraints name string 1 Required The identifier of the tool Must follow the snake_case noun_verb format Example odl_get_object description string 1 Required A plain text explanation of what the tool does and when it should be used This is the primary context provided to the calling model write boolean 1 Required Indicates if the tool modifies state Set to true if the underlying handler is annotated with @KlokMcpTool write true enabledByDefault boolean 1 Required Determines if the tool is registered without explicit configuration true for read only tools false for write tools which require RouteId mcp enabled true enabledKey string 0 1 Optional The specific configuration key used to enable or disable this tool Example value RouteId mcp enabled httpMethod string 0 1 Optional The HTTP verb of the REST operation being wrapped Allowed values GET POST PUT or DELETE operationPath string 0 1 Optional The full path template of the REST operation Example api odl type id apiRouteRef string 0 1 Optional The qualified name of the KlokRestApi entry in the sources list that declares the operation readOnlyHint boolean 0 1 Optional No documentation provided in schema destructiveHint boolean 0 1 Optional No documentation provided in schema idempotentHint boolean 0 1 Optional No documentation provided in schema arguments KlokMcpToolArgumentDocType 0 n Repeated A collection of argument definitions for the tool See section on KlokMcpToolArgumentDocType replyTypeRef string 0 1 Optional The qualified name of the reply type The JSON structure of this type represents the tool s response payload Structural Relationships and Logic The schema reveals specific logical connections between the fields particularly regarding tool registration and REST operation mapping Default Enablement Logic The field is directly correlated with the field If is read only is typically If is is In this case the field e g must be set to in the application configuration for the tool to become available REST Operation Mapping For tools backed by HTTP endpoints several optional fields work together to define the call Specifies the verb Specifies the endpoint URL template Links the tool to a specific API definition within the project s References to Other Types References an entry in the list within the context References a data type definition indicating the structure of the JSON returned by the tool Contains a list of objects which define the input parameters the model can pass to the tool Note on Undocumented Fields The fields and are present in the schema with cardinality and type but the provided schema documentation does not specify their intended use or allowed values Developers should map these fields as optional boolean flags noting that no semantic description is provided by the datamodel owners KlokMcpToolDocType klok project documentation v1 KlokMcpToolDocType @KlokMcpTool KlokRouteDocType mcpTool name description enabledByDefault write write false enabledByDefault true write true enabledByDefault false enabledKey RouteId mcp enabled true httpMethod operationPath apiRouteRef sources apiRouteRef sources KlokRestApi replyTypeRef arguments KlokMcpToolArgumentDocType readOnlyHint destructiveHint idempotentHint 0 1 boolean mcpTool

KlokMcpToolArgumentDocType

Added 2026 10 27 One argument of an MCP tool Used in KlokMcpToolDocType Field Type Cardinality Description name string 1 kind string 1 path query or body where the REST operation takes it from A plain string rather than an enumeration so that a new kind is not a breaking change required boolean 1 typeRef string 0 1 java lang String for a path or query parameter the qualified name of the request type for the body A KlokMcpToolArgumentDocType represents a single input parameter for a Model Context Protocol MCP tool It defines how this parameter is transmitted its location in the HTTP request its requirement status and its data type reference Within the model these objects are contained within the field of the Fields The type contains the following fields Field Type Cardinality Description name string 1 The identifier or name of the argument kind string 1 Specifies where the REST operation takes this argument from Allowed conceptual values are path query or body Note that this is a plain string not a strict enumeration to allow for new kinds without breaking compatibility required boolean 1 Indicates whether the argument is mandatory true or optional false for the tool invocation typeRef string 0 1 The reference to the data type of the argument For path or query parameters this is typically java lang String For body parameters this is the qualified name of the request type Field Relationships The schema establishes a strong link between the and fields The value of dictates the expected format and meaning of If is or The should describe a simple string based parameter commonly set to If is The should contain the qualified name of a complex request type object Since is optional 0 1 it may be absent though the field is always present The field operates independently to define the business logic constraint of the argument s presence regardless of its location or type klok project documentation v1 arguments KlokMcpToolDocType kind typeRef kind typeRef kind path query typeRef java lang String kind body typeRef typeRef kind required kind typeRef arguments

KlokDocEncodingType

How the content field is encoded Text is NONE binary is BASE64 large text is GZIP_BASE64 Restricts Value Description NONE BASE64 GZIP_BASE64 string

KlokSourceOriginType

Where a source file was read from Restricts Value Description PROJECT FRAMEWORK_JAR DATAMODEL_JAR DEPENDENCY_JAR string

KlokProjectTypeType

Restricts Value Description INTEGRATION DATAMODEL APPLICATION OTHER string

KlokDocScopeType

Visibility scope of the documentation on the portal derived from the repository path Restricts Value Description GLOBAL TENANT DOMAIN SYSTEM string

KlokLegTypeType

The leg letter of the route id I ingress P processing E egress A api S sub route T timer Restricts Value Description INGRESS PROCESSING EGRESS API SUBROUTE TIMER UNKNOWN string

KlokSolutionDeclaredInType

How the solution key was established in falling order of authority Restricts Value Description SOLUTION_META GRADLE ROUTE_NAME string

KlokComponentKindType

What a documented component is An annotation type is reported as INTERFACE Restricts Value Description CLASS RECORD ENUM INTERFACE PACKAGE string

KlokClaimCheckScopeType

Restricts Value Description TMP PERM string