Skip to content

Conversation

@Dav-14
Copy link
Contributor

@Dav-14 Dav-14 commented Dec 5, 2025

Summary by cubic

Add an end-to-end test for ledger schema and update the SDK/OpenAPI and Terraform resource to the latest schema format, ensuring consistent insert/read behavior and clearer API docs.

  • New Features

    • Added e2e test for ledger schema (tests/e2e/ledger_schema_test.go).
    • Updated integration test to match new schema model (Chart at root).
    • Added Terraform docs page for stack_ledger_schema (docs/resources/ledger_schema.md).
  • Refactors

    • Terraform ledger schema resource now uses shared.V2SchemaData and reads Chart from V2Schema.Chart.
    • OpenAPI: v2InsertSchema is “insert” only; V2Schema returns Chart at the root; log type UPDATED_SCHEMA → INSERTED_SCHEMA.
    • Cursor examples improved and “previous” added for schema responses.
    • Clarified PoolRequest/V3CreatePoolRequest descriptions (query fields; Connectivity v3.1).
    • Speakeasy Go SDK bumped to 3.10.0; user agent/version updated.
    • Minor logging cleanup in resource tracer (“call”/“completed”).

Written for commit 8c69ba9. Summary will update automatically on new commits.

@Dav-14 Dav-14 requested a review from a team as a code owner December 5, 2025 12:03
@coderabbitai
Copy link

coderabbitai bot commented Dec 5, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/add-integration-test-with-ledger-schema

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

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

4 issues found across 37 files

Prompt for AI agents (all 4 issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="openapi/payments/openapi.yaml">

<violation number="1" location="openapi/payments/openapi.yaml:3854">
P3: The V3 schema description also references a non-existent &quot;ListAccount&quot; operation; update it to `ListAccounts` to point to the real endpoint.</violation>
</file>

<file name="pkg/stack/.speakeasy/gen.lock">

<violation number="1" location="pkg/stack/.speakeasy/gen.lock:2012">
P2: The ListAccounts example sends a `sort` query parameter that the endpoint/SDK does not support, so following this example results in an invalid request.</violation>

<violation number="2" location="pkg/stack/.speakeasy/gen.lock:2026">
P2: GetAccount is documented with an `accountId` path parameter even though the operation only accepts `ledger` and `address`, so the example cannot be executed as written.</violation>
</file>

<file name="tests/e2e/ledger_schema_test.go">

<violation number="1" location="tests/e2e/ledger_schema_test.go:71">
P2: `TestLedgerSchema` never validates the `stack_ledger_schema` resource—only the ledger name—so regressions in schema creation would go unnoticed.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

name:
type: string
query:
description: The same query than in ListAccount. Allowed properties are id, reference, connector_id, type, default_asset, name, psu_id, open_banking_connection_id and metadata.
Copy link

@cubic-dev-ai cubic-dev-ai bot Dec 5, 2025

Choose a reason for hiding this comment

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

P3: The V3 schema description also references a non-existent "ListAccount" operation; update it to ListAccounts to point to the real endpoint.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At openapi/payments/openapi.yaml, line 3854:

<comment>The V3 schema description also references a non-existent &quot;ListAccount&quot; operation; update it to `ListAccounts` to point to the real endpoint.</comment>

<file context>
@@ -3844,12 +3844,14 @@ components:
         name:
           type: string
         query:
+          description: The same query than in ListAccount. Allowed properties are id, reference, connector_id, type, default_asset, name, psu_id, open_banking_connection_id and metadata.
           type: object
           additionalProperties: true
</file context>
Suggested change
description: The same query than in ListAccount. Allowed properties are id, reference, connector_id, type, default_asset, name, psu_id, open_banking_connection_id and metadata.
description: The same query as in ListAccounts. Allowed properties are id, reference, connector_id, type, default_asset, name, psu_id, open_banking_connection_id and metadata.
Fix with Cubic

path:
ledger: "ledger001"
address: "users:001"
accountId: "XXX"
Copy link

@cubic-dev-ai cubic-dev-ai bot Dec 5, 2025

Choose a reason for hiding this comment

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

P2: GetAccount is documented with an accountId path parameter even though the operation only accepts ledger and address, so the example cannot be executed as written.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pkg/stack/.speakeasy/gen.lock, line 2026:

<comment>GetAccount is documented with an `accountId` path parameter even though the operation only accepts `ledger` and `address`, so the example cannot be executed as written.</comment>

<file context>
@@ -2024,6 +2023,7 @@ examples:
         path:
           ledger: &quot;ledger001&quot;
           address: &quot;users:001&quot;
+          accountId: &quot;XXX&quot;
       responses:
         &quot;200&quot;:
</file context>
Fix with Cubic

metadata: {"key": "<value>"}
balance: 2400
cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
sort: ["date:asc", "status:desc"]
Copy link

@cubic-dev-ai cubic-dev-ai bot Dec 5, 2025

Choose a reason for hiding this comment

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

P2: The ListAccounts example sends a sort query parameter that the endpoint/SDK does not support, so following this example results in an invalid request.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pkg/stack/.speakeasy/gen.lock, line 2012:

<comment>The ListAccounts example sends a `sort` query parameter that the endpoint/SDK does not support, so following this example results in an invalid request.</comment>

<file context>
@@ -2011,6 +2009,7 @@ examples:
           metadata: {&quot;key&quot;: &quot;&lt;value&gt;&quot;}
           balance: 2400
           cursor: &quot;aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==&quot;
+          sort: [&quot;date:asc&quot;, &quot;status:desc&quot;]
       responses:
         &quot;200&quot;:
</file context>
Fix with Cubic

@Dav-14 Dav-14 changed the title feat: add integraton test with ledger schema feat: add integration test with ledger schema Dec 5, 2025
@Dav-14 Dav-14 force-pushed the feat/add-integration-test-with-ledger-schema branch from ca952a1 to 8c69ba9 Compare December 5, 2025 12:26
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.

2 participants