Skip to content
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

fix: missing field in openapi #715

Merged
merged 1 commit into from
Feb 27, 2025
Merged

fix: missing field in openapi #715

merged 1 commit into from
Feb 27, 2025

Conversation

gfyrag
Copy link
Contributor

@gfyrag gfyrag commented Feb 27, 2025

No description provided.

@gfyrag gfyrag requested a review from a team as a code owner February 27, 2025 11:25
Copy link

coderabbitai bot commented Feb 27, 2025

Warning

Rate limit exceeded

@gfyrag has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 2 minutes and 39 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 9906c1a and 4164dea.

⛔ Files ignored due to path filters (4)
  • openapi.yaml is excluded by !**/*.yaml
  • openapi/v2.yaml is excluded by !**/*.yaml
  • pkg/client/.speakeasy/gen.lock is excluded by !**/*.lock, !**/*.lock
  • pkg/client/.speakeasy/gen.yaml is excluded by !**/*.yaml
📒 Files selected for processing (4)
  • docs/api/README.md (6 hunks)
  • pkg/client/docs/models/components/v2ledger.md (1 hunks)
  • pkg/client/formance.go (1 hunks)
  • pkg/client/models/components/v2ledger.go (2 hunks)

Walkthrough

The PR introduces a new features object into ledger-related API schemas and documentation. The object, containing two string properties (property1 and property2), is now part of responses for listing and retrieving ledgers, included in the ledger creation request, and integrated into the ledger data model. Additionally, the client SDK version is updated (0.6.0 → 0.6.2) and a new accessor method (GetFeatures) is added for the ledger model.

Changes

File(s) Change Summary
docs/api/README.md
pkg/client/docs/models/components/v2ledger.md
Added a new features object/field to API response schemas and documentation for the ledger. The object includes two string properties (property1 and property2), and in the documentation, the Features field is defined as a map with string keys and string pointer values. A new ID field is also added as a string.
pkg/client/formance.go Updated SDK version from "0.6.0" to "0.6.2" and modified the UserAgent string accordingly.
pkg/client/models/components/v2ledger.go Added a new Features map[string]string field to the V2Ledger struct and introduced the GetFeatures method to retrieve this field safely. A new ID field is also added as a pointer to a string, along with the GetID method.

Possibly related PRs

Suggested reviewers

  • flemzord
  • Dav-14

Poem

Hopping through the lines of code so bright,
I found new features in ledger's light.
With "property1" and "property2" in the mix,
And SDK hopping to a new version fix!
A bunny celebrates each update in delight 🐇💻


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.95%. Comparing base (a1d1b1f) to head (4164dea).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #715      +/-   ##
==========================================
- Coverage   81.97%   81.95%   -0.03%     
==========================================
  Files         135      135              
  Lines        7291     7291              
==========================================
- Hits         5977     5975       -2     
- Misses       1008     1010       +2     
  Partials      306      306              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gfyrag gfyrag force-pushed the fix/openapi-missing-field branch from 2228696 to 9906c1a Compare February 27, 2025 11:46
@gfyrag gfyrag enabled auto-merge February 27, 2025 11:46
@gfyrag gfyrag force-pushed the fix/openapi-missing-field branch from 9906c1a to 1edd373 Compare February 27, 2025 11:48
Copy link

@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: 0

🧹 Nitpick comments (1)
pkg/client/docs/models/components/v2ledger.md (1)

13-13: Fix type definition for the ID field.

There's a typo in the type definition for the ID field - it's shown as **string* with an extra asterisk. This should be corrected to *string* to match the implementation in the Go code.

-| `ID`                                      | **string*                                 | :heavy_minus_sign:                        | N/A                                       |                                           |
+| `ID`                                      | *string*                                  | :heavy_minus_sign:                        | N/A                                       |                                           |
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2228696 and 9906c1a.

⛔ Files ignored due to path filters (4)
  • openapi.yaml is excluded by !**/*.yaml
  • openapi/v2.yaml is excluded by !**/*.yaml
  • pkg/client/.speakeasy/gen.lock is excluded by !**/*.lock, !**/*.lock
  • pkg/client/.speakeasy/gen.yaml is excluded by !**/*.yaml
📒 Files selected for processing (4)
  • docs/api/README.md (6 hunks)
  • pkg/client/docs/models/components/v2ledger.md (1 hunks)
  • pkg/client/formance.go (1 hunks)
  • pkg/client/models/components/v2ledger.go (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/client/formance.go
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Tests
🔇 Additional comments (2)
pkg/client/models/components/v2ledger.go (1)

15-16: Implementation looks good.

The addition of the new Features and ID fields to the struct, along with their corresponding getter methods follows the established pattern in the codebase. The nil checks in the getter methods provide proper defensive programming.

Also applies to: 58-70

docs/api/README.md (1)

161-165: Documentation updates are consistent.

The features and id fields have been properly added to all relevant sections of the API documentation, maintaining consistency with the V2Ledger model changes. The feature object properties are documented as examples with "property1" and "property2" strings, which is appropriate for documentation purposes.

Also applies to: 217-222, 263-266, 4323-4342

@gfyrag gfyrag force-pushed the fix/openapi-missing-field branch from 1edd373 to a08d937 Compare February 27, 2025 11:51
@gfyrag gfyrag force-pushed the fix/openapi-missing-field branch from a08d937 to 4164dea Compare February 27, 2025 11:52
@gfyrag gfyrag added this pull request to the merge queue Feb 27, 2025
Merged via the queue into main with commit fd8f302 Feb 27, 2025
9 of 10 checks passed
@gfyrag gfyrag deleted the fix/openapi-missing-field branch February 27, 2025 12:12
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