Record-search pagination tip recommends --offset even when --json rejects it

Đang mở Phù hợp với người mới
#2,940 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
75/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
cli

Hướng nghiên cứu

Đọc shortcuts/base/record_export.go ở phần hướng dẫn chung về phân trang, sau đó kiểm tra shortcuts/base/record_query.go ở phần xác thực JSON và phân trang. Điều chỉnh cho nhất quán hướng dẫn tiếp tục dành cho chế độ dùng flag và chế độ dùng phần thân JSON; hoàn tất khi hướng dẫn bảo người gọi dùng JSON đặt offset tiếp theo trong phần thân yêu cầu và không còn gợi ý flag --offset mâu thuẫn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

Hullo folks,

I'm doing some research for Tessl Code Review and we ran it against your repo. It flagged a potential issue, and I figured it made sense to share it with you:

The shared record-analysis tip tells callers to continue with --offset set to next_offset when has_more is true. +record-search includes this tip, including when the request uses --json.

For example, a caller starts with:

lark-cli base +record-search --base-token <base> --table-id <table> \
  --json '{"keyword":"Alice","search_fields":["Name"],"limit":2}'

If the response has more results, following the tip by adding --offset 2 conflicts with --json. The validator rejects explicitly supplied pagination flags; offset is in that exclusive set.

Expected: distinguish flag-mode continuation from JSON-body continuation. For the latter, put "offset":2 inside the JSON body. The validation hint already explains this, but the earlier pagination instruction sends the caller into the error.

This is a help-text/validation inconsistency established from current source, not a live Lark API test. Checked commit: c5fbf1a52df77d5cb9cac2b1501770b2fb9af7d2.

Full transparency: I work at Tessl, and we've spotted that using Tessl Code Review - using repository-level context and specific review lenses that improve over time through feedback. That’s how this finding surfaced.

We’re just getting started and want to offer the tool free to open-source projects. If this is useful, happy to give you access.

Baptiste

Ngôn ngữ chính
Go
Star
18.2k
Fork
1.4k
Merge trung bình
20 giờ 34 phút
Pull request đã merge (30 ngày)
17

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của larksuite/cli

Tất cả issue của larksuite/cli

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.