Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds an Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (4)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (4)
src/schemas/schemas.json (3)
8913-8916: TreatapiTokenas a secret in the schema (UI + guardrails).Consider adding
format: "password"(common in schema-driven UIs) and basic constraints likeminLength: 1to 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:outputPathreadOnly: consider preventing user-supplied values (if your validator honors it).
readOnly: trueis mostly informational unless your tooling enforces it. If clients must not provide it, consider anallOf/notguard to reject instances whereoutputPathis 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
examplesarray for test generation—if that rule applies to this schema node too, consider addingexamplesunderintegrations.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 optionalscenarioNamefield in the example.The example shows all required fields but omits the optional
scenarioNameproperty. 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
⛔ Files ignored due to path filters (3)
dist/schemas/config_v3.schema.jsonis excluded by!**/dist/**dist/schemas/resolvedTests_v3.schema.jsonis excluded by!**/dist/**package-lock.jsonis 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.jsonsrc/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.jsonsrc/schemas/output_schemas/resolvedTests_v3.schema.jsonsrc/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 theapiTokenfield 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.
|
📝 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
Summary by CodeRabbit
New Features
Documentation / Examples
✏️ Tip: You can customize this high-level summary in your review settings.