-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add integration test with ledger schema #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/develop-with-pool-and-ledger-schema
Are you sure you want to change the base?
feat: add integration test with ledger schema #45
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit 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)
Comment |
There was a problem hiding this 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 "ListAccount" 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. |
There was a problem hiding this comment.
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 "ListAccount" 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>
| 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. |
| path: | ||
| ledger: "ledger001" | ||
| address: "users:001" | ||
| accountId: "XXX" |
There was a problem hiding this comment.
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: "ledger001"
address: "users:001"
+ accountId: "XXX"
responses:
"200":
</file context>
| metadata: {"key": "<value>"} | ||
| balance: 2400 | ||
| cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" | ||
| sort: ["date:asc", "status:desc"] |
There was a problem hiding this comment.
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: {"key": "<value>"}
balance: 2400
cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
+ sort: ["date:asc", "status:desc"]
responses:
"200":
</file context>
ca952a1 to
8c69ba9
Compare
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
Refactors
Written for commit 8c69ba9. Summary will update automatically on new commits.