Skip to content

Schema updates for Heretto integration#148

Merged
hawkeyexl merged 7 commits intomainfrom
heretto
Dec 16, 2025
Merged

Schema updates for Heretto integration#148
hawkeyexl merged 7 commits intomainfrom
heretto

Conversation

@hawkeyexl
Copy link
Contributor

@hawkeyexl hawkeyexl commented Dec 14, 2025

Summary by CodeRabbit

  • New Features

    • Heretto CMS integration: configure multiple Heretto instances (credentials and org IDs) to automate scenario execution and content retrieval.
    • DITA map processing: enable processing of DITA maps within workflows.
  • Documentation / Examples

    • Added example configurations, a default scenario name, and a read-only download path for retrieved Heretto content.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 14, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds an integrations.heretto array across multiple JSON schema files, defining Heretto CMS integration objects with required credentials (name, organizationId, username, apiToken), optional scenarioName (default "Doc Detective"), a readOnly outputPath, and matching example entries.

Changes

Cohort / File(s) Summary
Heretto integration schemas & examples
src/schemas/output_schemas/config_v3.schema.json, src/schemas/output_schemas/resolvedTests_v3.schema.json, src/schemas/schemas.json, src/schemas/src_schemas/config_v3.schema.json
Added integrations.heretto as an array titled "Heretto CMS integrations" whose items are objects (title: "Heretto CMS integration") with additionalProperties: false, required fields name, organizationId, username, apiToken; optional scenarioName (default "Doc Detective") and readOnly outputPath. Inserted component schema definitions and updated example config entries (including sample integrations.heretto entries and processDitaMaps examples).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Attention points:
    • Ensure no unintended duplication or conflicting definitions between components.schemas and top-level config entries for heretto.
    • Verify consistency of descriptions, default value for scenarioName, readOnly on outputPath, and password format for apiToken.
    • Validate all example objects conform to the new schema (required fields present, types and constraints respected).

Possibly related PRs

Poem

🐇 I hopped through schemas, neat and spry,
Adding Heretto entries with a gleeful sigh.
Names, tokens, orgs in tidy rows,
Scenarios set where content flows.
A rabbit’s cheer — integrations go hi-five! 🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Schema updates for Heretto integration' accurately and clearly describes the main changes, which involve adding Heretto CMS integration support across multiple schema files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 45a33d4 and 6014c8d.

⛔ Files ignored due to path filters (2)
  • dist/schemas/config_v3.schema.json is excluded by !**/dist/**
  • dist/schemas/resolvedTests_v3.schema.json is excluded by !**/dist/**
📒 Files selected for processing (4)
  • src/schemas/output_schemas/config_v3.schema.json (2 hunks)
  • src/schemas/output_schemas/resolvedTests_v3.schema.json (2 hunks)
  • src/schemas/schemas.json (4 hunks)
  • src/schemas/src_schemas/config_v3.schema.json (2 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (4)
src/schemas/schemas.json (3)

8913-8916: Treat apiToken as a secret in the schema (UI + guardrails).

Consider adding format: "password" (common in schema-driven UIs) and basic constraints like minLength: 1 to reduce accidental empty tokens; also consider adding a note discouraging logging this field.

                 "apiToken": {
                   "type": "string",
+                  "format": "password",
+                  "minLength": 1,
                   "description": "API token generated in Heretto CCMS for authentication. See https://help.heretto.com/en/heretto-ccms/api/ccms-api-authentication/basic-authentication#ariaid-title3"
                 },

Also applies to: 29281-29284


8922-8926: outputPath readOnly: consider preventing user-supplied values (if your validator honors it).

readOnly: true is mostly informational unless your tooling enforces it. If clients must not provide it, consider an allOf/not guard to reject instances where outputPath is present in input configs (or clarify via description that it’s ignored when provided).

Also applies to: 29290-29294


16605-16619: Examples: good placeholders, but ensure they satisfy your schema “examples array” convention.

You added example objects in the existing examples list, which is great. One thing to double-check: per repo learnings, schemas are expected to include an examples array for test generation—if that rule applies to this schema node too, consider adding examples under integrations.heretto (or wherever the harness expects it), not just in the global examples section. Based on learnings, this may be required by your tests.

Also applies to: 36973-36987

src/schemas/output_schemas/resolvedTests_v3.schema.json (1)

16220-16233: Consider including optional scenarioName field in the example.

The example shows all required fields but omits the optional scenarioName property. Including it would demonstrate the complete configuration options available.

Apply this diff to enhance example completeness:

         {
           "integrations": {
             "heretto": [
               {
                 "name": "example",
                 "organizationId": "your-organization-id",
                 "username": "your-username",
-                "apiToken": "your-api-token"
+                "apiToken": "your-api-token",
+                "scenarioName": "Doc Detective"
               }
             ]
           }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c874b8a and a06b84e.

⛔ Files ignored due to path filters (3)
  • dist/schemas/config_v3.schema.json is excluded by !**/dist/**
  • dist/schemas/resolvedTests_v3.schema.json is excluded by !**/dist/**
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • src/schemas/output_schemas/config_v3.schema.json (2 hunks)
  • src/schemas/output_schemas/resolvedTests_v3.schema.json (2 hunks)
  • src/schemas/schemas.json (4 hunks)
  • src/schemas/src_schemas/config_v3.schema.json (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/schemas/src_schemas/*.json

📄 CodeRabbit inference engine (AGENTS.md)

src/schemas/src_schemas/*.json: Always include examples array in all schemas (required for test generation)
In source schemas, use relative $ref paths like "$ref": "context_v3.schema.json#/properties/example"

Files:

  • src/schemas/src_schemas/config_v3.schema.json
🧠 Learnings (4)
📚 Learning: 2025-11-25T23:59:43.235Z
Learnt from: CR
Repo: doc-detective/common PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T23:59:43.235Z
Learning: Applies to src/schemas/src_schemas/*.json : Always include examples array in all schemas (required for test generation)

Applied to files:

  • src/schemas/schemas.json
  • src/schemas/output_schemas/resolvedTests_v3.schema.json
📚 Learning: 2025-05-29T16:54:47.192Z
Learnt from: hawkeyexl
Repo: doc-detective/common PR: 117
File: src/schemas/output_schemas/resolvedTests_v3.schema.json:24-30
Timestamp: 2025-05-29T16:54:47.192Z
Learning: In doc-detective/common schemas, `$schema` properties within object definitions are intentionally added to allow described JSON objects to be self-describing for linting purposes. This enables JSON linters and validators to automatically validate objects against the referenced schema. The version information is embedded in the filename using the pattern `<schema>_v3.schema.json`.

Applied to files:

  • src/schemas/schemas.json
  • src/schemas/output_schemas/resolvedTests_v3.schema.json
  • src/schemas/output_schemas/config_v3.schema.json
📚 Learning: 2025-08-22T20:01:21.087Z
Learnt from: hawkeyexl
Repo: doc-detective/common PR: 134
File: src/schemas/output_schemas/report_v3.schema.json:5695-5921
Timestamp: 2025-08-22T20:01:21.087Z
Learning: The report_v3.schema.json includes dragAndDrop via inclusion in the spec schema, which includes the test and step schemas, creating a chain of schema inclusions.

Applied to files:

  • src/schemas/output_schemas/resolvedTests_v3.schema.json
📚 Learning: 2025-11-25T23:59:43.235Z
Learnt from: CR
Repo: doc-detective/common PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T23:59:43.235Z
Learning: Applies to test/*.test.js : Test structure uses Mocha + Chai; validate schema examples in test/schema.test.js (auto-generated from schemas)

Applied to files:

  • src/schemas/output_schemas/resolvedTests_v3.schema.json
🔇 Additional comments (5)
src/schemas/src_schemas/config_v3.schema.json (2)

226-264: Schema structure for heretto integration looks solid.

The heretto integration definition is well-structured with appropriate validation. Required fields are clearly specified, descriptions are informative, and the readOnly outputPath correctly reflects runtime-set values.


563-580: Examples are properly included and demonstrate new features clearly.

The examples section includes well-placed demonstrations of the new processDitaMaps and heretto integration configurations. The heretto example correctly shows the required properties; optional fields are appropriately omitted since the example focuses on the minimum valid configuration. Per coding guidelines, examples are included for test generation.

src/schemas/output_schemas/config_v3.schema.json (2)

8490-8532: Schema structure, validation, and documentation are well implemented.

The heretto integration definition includes:

  • Comprehensive property descriptions with helpful context (e.g., organizationId subdomain example, apiToken documentation link)
  • Proper validation constraints (required fields, additionalProperties: false for strict validation)
  • Sensible default for scenarioName ("Doc Detective")
  • Appropriate readOnly constraint on outputPath to prevent user misconfiguration

16207-16220: Example configurations properly demonstrate usage.

The examples show correct usage patterns for the heretto integration with placeholder credentials. The placement alongside other feature examples (crawl, processDitaMaps) helps users understand how to compose configurations.

src/schemas/output_schemas/resolvedTests_v3.schema.json (1)

8503-8545: The Heretto documentation URL referenced in the apiToken field description is legitimate and points to the correct Heretto CCMS API authentication resource. The schema design correctly captures the required authentication parameters (organizationId, username, apiToken) as per Heretto's official API documentation.

@promptless
Copy link

promptless bot commented Dec 14, 2025

📝 Documentation updates detected!

New suggestion: Document Heretto CMS integration for DITA content testing

…"DITA map"

- Replace wording in src/schemas/src_schemas/config_v3.schema.json
- Replace wording in src/schemas/output_schemas/config_v3.schema.json
- Replace wording in src/schemas/schemas.json
- Update generated/dist schemas in dist/schemas/config_v3.schema.json and dist/schemas/resolvedTests_v3.schema.json
@hawkeyexl hawkeyexl merged commit ea835d1 into main Dec 16, 2025
10 of 11 checks passed
@hawkeyexl hawkeyexl deleted the heretto branch December 16, 2025 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant