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
Fern should validate that each item in the refunds array matches the CardAcquiringRefund schema
Fern should not require transfer context fields (transferID, source, destination) on each refund item since these are already available at the transfer level
Current Behavior:
Fern is reporting validation errors:
[api]: transfers.yml -> service -> endpoints -> createTransfer -> examples[0] -> response
transfers.yml
Example is missing required property "response.body.refunds.0.transferID"
Example is missing required property "response.body.refunds.0.source"
Example is missing required property "response.body.refunds.0.destination"
Unexpected property "refundID"
Unexpected property "updatedOn"
Unexpected property "cardDetails"
This suggests Fern is incorrectly expecting each refund item to include the 3 transfer fields, even though these fields are already available at the parent transfer level.
You can download our OpenAPI spec here. The example in our OpenAPI spec that we think this error occurs on is likely the following:
But note that there is no refunds field set in this example, so we're not sure why the returned error suggests that this field is being set when it isn't.
Impact:
This prevents us from using Fern to validate our OpenAPI spec, as it's incorrectly requiring fields that should not be present in the nested array items.
Environment:
OpenAPI version: 3.0.0
Fern version: 0.60.4
OS: macOS 15.4.1
Node: v23.11.0
The text was updated successfully, but these errors were encountered:
How urgent is this?
P2 - Medium (Would be helpful)
What's the issue?
Fern is incorrectly validating nested array items in our OpenAPI spec, specifically for the
refunds
array in theTransfer
model.Our OpenAPI spec defines:
Transfer
model with top-level fields includingtransferID
,source
,destination
, and arefunds
arrayCardAcquiringRefund
model for items in therefunds
arrayExample TypeSpec:
Expected Behavior:
refunds
array matches theCardAcquiringRefund
schematransferID
,source
,destination
) on each refund item since these are already available at the transfer levelCurrent Behavior:
Fern is reporting validation errors:
This suggests Fern is incorrectly expecting each refund item to include the 3 transfer fields, even though these fields are already available at the parent transfer level.
You can download our OpenAPI spec here. The example in our OpenAPI spec that we think this error occurs on is likely the following:
But note that there is no
refunds
field set in this example, so we're not sure why the returned error suggests that this field is being set when it isn't.Steps to reproduce errors:
fern init --openapi ./path/to/openapi.yml
(use our openapi.yaml spec linked above)fern generate
Impact:
This prevents us from using Fern to validate our OpenAPI spec, as it's incorrectly requiring fields that should not be present in the nested array items.
Environment:
The text was updated successfully, but these errors were encountered: