fix: proper NocoDB API v3 response/request format handling#14
Merged
Conversation
The v3 API uses fundamentally different response and request formats: - Records list uses "records" key instead of "list" - Record IDs use lowercase "id" instead of "Id" - Field data is wrapped in a "fields" object - Pagination uses cursor-based next/prev instead of pageInfo - Create/update requests must wrap data in "fields" object Added ResponseAdapter and RequestAdapter classes that transparently handle v2/v3 format differences, keeping the public API consistent. All existing v2 behavior remains unchanged (passthrough).
🤖 AI Analysis for NocoDB Simple ClientTechnical Summary The pull request addresses significant differences in the handling of API responses and requests between NocoDB API v2 and v3. The updates ensure backward compatibility with API v2 while properly adapting the new formats introduced in v3. Technical Requirements and Constraints
Impact AssessmentThis issue/PR affects the NocoDB Simple Client Python library. This summary was automatically generated by AI to help with triage and may not be 100% accurate. |
🔍 PR Validation ReportOverall Status: ✅ PASSED Validation Results
🎉 Great job! All validation checks passed. This PR is ready for review. Automated validation by Automation Templates |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ResponseAdapterandRequestAdapterclasses inapi_version.pyfor transparent v2/v3 format conversionclient.pyto use the adaptersChanges
v3 Response Format Differences Handled
"list""records""Id"(uppercase)"id"(lowercase){"Name": "John"}{"fields": {"Name": "John"}}pageInfowithisLastPagenext/prevv3 Request Format Differences Handled
{"Name": "John"}{"fields": {"Name": "John"}}{"Id": 42}{"id": 42}[{...}, {...}]{"records": [{...}, {...}]}Test plan
TestResponseAdapterunit tests (11 tests)TestRequestAdapterunit tests (9 tests)TestV3ResponseFormatHandlingintegration tests (7 tests)🤖 Generated with Claude Code