Add support for the destination service $includeMetadata query param

Aperta
#7,058 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
62/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
api, backend

Direzione di ricerca

Start by locating fetchDestinations and getAllDestinationsFromDestinationService, then read the destination response type and nearby tests. Check how these functions build query parameters and map responses. Done means callers can request $includeMetadata and access the returned $metadata field; add or update tests for both behaviors.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

feature request tok:pd5
Describe the Problem

fetchDestinations (and getAllDestinationsFromDestinationService) do not expose the $includeMetadata query parameter supported by the Destination Service REST API. This forces consumers who need destination metadata (e.g. labels) to bypass the SDK entirely and make raw HTTP calls, losing the built-in resilience middleware (timeout, circuit breaker).

The Destination Service /subaccountDestinations endpoint accepts: GET /destination-configuration/v1/subaccountDestinations?$includeMetadata=labels
The response then includes a $metadata field per destination:

{
  "Name": "my-dest",
  "$metadata": {
    "labels": [{ "name": "IntegrationCell.Include", "value": "true" }]
  }
}

Reference: https://api.sap.com/api/SAP_CP_CF_Connectivity_Destination/path/get_v1_subaccountDestinations

Propose a Solution

Current Behavior
fetchDestinations has no options parameter for additional query parameters. The destination response type also has no $metadata / labels field.

Desired Behavior
Allow passing $includeMetadata (and potentially other future query parameters) to fetchDestinations, and expose the returned metadata on the destination object:

// Option A — explicit named option
fetchDestinations(uri, token, "subaccount", { includeMetadata: ["labels"] })

// Option B — generic extra params
fetchDestinations(uri, token, "subaccount", { queryParams: { $includeMetadata: "labels" } })
The Destination type (or the raw response type) should be extended to carry the $metadata field so consumers don't need to maintain a parallel raw type.

Describe Alternatives

No response

Affected Development Phase

Production

Impact

Inconvenience

Timeline

No response

Additional Context

No response

Lingua principale
TypeScript
Stelle
221
Fork
79
Merge medio
13h 27m
PR unite (30g)
22

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SAP/cloud-sdk-js

Tutte le issue di SAP/cloud-sdk-js

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.