Type declarations are not case consistent
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 22/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- typescript
- Bereich
- api
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 264
- Forks
- 177
- Ø Merge
- 10 Std. 5 Min.
- Gemergte PRs (30 T.)
- 5
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus XeroAPI/xero-node
-
`getClientCredentialsToken()` sends `scopes` (comma-joined) instead of the OAuth `scope` parameterOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
Schwierigkeit 3/5 Ein halber Tag Anfängerfreundlichkeit 55/100
-
TrackingOptionId value missing from accountingApi.getInvoices()Evtl. vergeben @miachillgood hat das vor 152 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 18/100
-
BankTransaction type is missing the batchPayment object.Evtl. vergeben @miachillgood hat das vor 171 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 22/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 25/100
Alle Issues in XeroAPI/xero-node
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
super-productivity/super-productivity#12128 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
A docs change can fail pnpm check, because outreach lint and gen:types both write .astro/ at onceEvtl. vergeben @2389400626lh-ops hat das heute übernommen. OffenArea: Infrastructure Area: Outreach Bug Difficulty: Low Good First Issue Priority: Low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
DouglasNeuroInformatics/OpenDataCapture#1956 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 72/100
justyns/silverbullet-ai#199 ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
spartan-ng/spartan#1931 ·
Maintainer antworten meist innerhalb von 2 Tagen