ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
136 stars 64 forks source link

[Bug]: Payload binding failed when running the OpenAI Finetunes connector #6979

Open KATTA-00 opened 2 months ago

KATTA-00 commented 2 months ago

Description

After generating the client from the OpenAI OpenAPI spec, I encountered the following runtime error:

Error: Payload binding failed: 'map' value cannot be converted to 'client:OpenAIFile':

  • Field 'status_details' in record 'client:OpenAIFile' should be of type 'string', but found '()'.

To work around this issue, I modified the status_details property in the OpenAIFile object as follows:

  • Original:

    • Deprecated: true
    • Nullable: Not specified
  • Updated:

    • Removed the deprecated parameter
    • Added the nullable parameter with a value of true

This adjustment resolves the error and allows the client to function correctly.