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
Wrong return type generated by provider, is unit, instead the openapi spec declares a default return type
Repro steps
Please provide the steps required to reproduce the problem
Type provider type definition with parameters :
// in any .fsx script
#r "nuget:SwaggerProvider"openSwaggerProvideropenSystem.Threading.Tasks[<Literal>]letrefundOpenapi="https://developers.trip.com/flight/docs/distributor-refund-service/openapi.v1.7.en-US.yaml"typeTripRefundProvider= OpenApiClientProvider<refundOpenapi>[<Literal>]letorderOpenapi="https://developers.trip.com/flight/docs/distributor-order-service/openapi.v1.7.en-US.yaml"typeTripOrderProvider= OpenApiClientProvider<orderOpenapi>letrefundClient= TripRefundProvider.Client()letorderClient= TripOrderProvider.Client()letgetOrderDetails orderId =task{letorderDetailRequest=new TripOrderProvider.QueryOrderDetailRequest(
orderId,
languageCode ="en-US")let!order= orderClient.QueryOrderDetail orderDetailRequest
order // unit! wrong this should be OrderDetailResponse type, also according to openapi spec}
externalValue is not supported at the moment, there is no way to resolve schema parts defined in multiple files, download them form somewhere and combine into one full schema.
Like if your case, yaml schema reference some json files with relative path.
can we maybe parse schema before examples node?
and ignore if there is errors in examples node...
examples:
success:
summary: "success"
description: |
success response
externalValue: "../distributor-order-service/json/QueryOrderDetail-Response.json"
schema: // THIS PART SHOULD STILL BE PARSED DOESNT DEPEND ON EXTERNAL VALUES
description: |
QueryOrderDetail's response.
$ref: "#/components/schemas/QueryOrderDetailResponse"
Description
Wrong return type generated by provider, is unit, instead the openapi spec declares a default return type
Repro steps
Please provide the steps required to reproduce the problem
https://developers.trip.com/flight/docs/distributor-order-service/?lang=en-US
: https://developers.trip.com/flight/docs/distributor-refund-service/openapi.v1.7.en-US.yaml
Expected behavior
I should see the correct return type in generated api client, not unit.
Actual behavior
the generated client has
unit
type.Known workarounds
Not known
Affected Type Providers
Related information
The text was updated successfully, but these errors were encountered: