Type declarations are not case consistent
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 22/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- typescript
- Domaine
- api
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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:
- Go to API Explorer and call any basic GET endpoint (Payments)
- Observe response with capitalised property names
- Find payment.d.ts file in xero-node SDK
- See the same type but with lowercase starting property names
Expected behavior
The types in the SDK should match the API responses.
Screenshots
I have observed this so far with Payments and Budgets, however I imagine this is the same for most/all endpoints.
- Langage dominant
- TypeScript
- Étoiles
- 264
- Forks
- 177
- Merge moyen
- 10 h 5 min
- PR mergées (30 j)
- 5
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de XeroAPI/xero-node
-
`getClientCredentialsToken()` sends `scopes` (comma-joined) instead of the OAuth `scope` parameterOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
Difficulté 3/5 Une demi-journée Accessibilité débutants 55/100
-
TrackingOptionId value missing from accountingApi.getInvoices()Peut-être pris @miachillgood l’a pris il y a 152 jours. Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 18/100
-
BankTransaction type is missing the batchPayment object.Peut-être pris @miachillgood l’a pris il y a 171 jours. Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 22/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 25/100
Toutes les issues de XeroAPI/xero-node
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
super-productivity/super-productivity#12128 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
A docs change can fail pnpm check, because outreach lint and gen:types both write .astro/ at oncePeut-être pris @2389400626lh-ops l’a pris aujourd’hui. OuverteArea: Infrastructure Area: Outreach Bug Difficulty: Low Good First Issue Priority: Low
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
DouglasNeuroInformatics/OpenDataCapture#1956 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 1-3 heures Accessibilité débutants 72/100
justyns/silverbullet-ai#199 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
spartan-ng/spartan#1931 ·
Les mainteneurs répondent en général sous 2 jours