Type declarations are not case consistent

オープン
#736 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
22/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
api

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
264
フォーク
177
平均マージ
10時間 5分
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

XeroAPI/xero-node のほかの issue

XeroAPI/xero-node の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。