Type declarations are not case consistent

Đang mở
#736 2 bình luận 1 reaction 0 người được giao Xem trên GitHub

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
22/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
api

Hướng nghiên cứu

Start from the payment.d.ts declaration the issue names and compare its property casing with the Payments and Budgets responses the issue quotes. The issue does not say whether the SDK types are generated, so first check how the declarations are produced before editing any of them. Done would mean the declared property names match the API's capitalised responses, which needs a maintainer decision on the generation approach.

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

Mô tả

SDK you're using (please complete the following information):

  • Version 9.3.0-alpha.5

Describe the bug
The exported types from the xero-node sdk are not capitalised yet the responses from the API are.

This mismatch makes it so that the types can't be used to define response payloads without some kind of manual serialisation step involved, or opting to simply not use them at all.

e.g. GET Payments
API returns BankAmount, Amount etc
The SDK type declaration has these as bankAmount, amount

To Reproduce
Steps to reproduce the behavior:

  1. Go to API Explorer and call any basic GET endpoint (Payments)
  2. Observe response with capitalised property names
  3. Find payment.d.ts file in xero-node SDK
  4. See the same type but with lowercase starting property names

Expected behavior
The types in the SDK should match the API responses.

Screenshots
image
image

I have observed this so far with Payments and Budgets, however I imagine this is the same for most/all endpoints.

Ngôn ngữ chính
TypeScript
Star
264
Fork
177
Merge trung bình
10 giờ 5 phút
Pull request đã merge (30 ngày)
5

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

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 XeroAPI/xero-node

Tất cả issue của XeroAPI/xero-node

Issue tương tự

Thêm issue về TypeScript

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.