You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* * Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved. * * This is a generated file powered by the SAP Cloud SDK for JavaScript. */importtype{SetCostCenter}from'./set-cost-center';importtype{SetDeliveryOption}from'./set-delivery-option';importtype{SetGuestEmail}from'./set-guest-email';importtype{SetPaymentType}from'./set-payment-type';importtype{SetPurchaseOrderNumber}from'./set-purchase-order-number';importtype{SetShippingAddress}from'./set-shipping-address';importtype{AddShippingAddress}from'./add-shipping-address';/** * List of checkout operations. */exporttypeCheckoutOperationList={/** * List of checkout operations. */operations:
|SetCostCenter|SetDeliveryOption|SetGuestEmail|SetPaymentType|SetPurchaseOrderNumber|SetShippingAddress|AddShippingAddress[];};
Expected behavior
In the generated schema example from above we see that only last union type (AddShippingAddress[]) is marked as array. The expected behaviour is that entire union is marked as array! Example:
...
operations:
(SetCostCenter|SetDeliveryOption|SetGuestEmail|SetPaymentType|SetPurchaseOrderNumber|SetShippingAddress|AddShippingAddress)[];
...
` ``**Used Versions:**- node version via `node-v` -> v20.12.2- npm version via `npm-v` ->10.5.0-SAPCloudSDKversionyouusedasdependency->3.15.0**Impact/Priority**ThisisblockingourteamfromgeneratingcorrectschemaSDK.AffectsourRelease&ProductionPhase.Timeline: e.g.Go-Liveisinfewweeks.
The text was updated successfully, but these errors were encountered:
Thank you for the quick reply. I can confirm that this issue does not exist in the latest release and the generation output is the array of the union type as expected.
Describe the bug
There is a type generation error when generating ab array of oneOf types.
To Reproduce
E.g. when generating the type for an object of this shape:
the generated output is the following:
Expected behavior
In the generated schema example from above we see that only last union type (
AddShippingAddress[]
) is marked as array. The expected behaviour is that entire union is marked as array! Example:The text was updated successfully, but these errors were encountered: