openapi-to-postman icon indicating copy to clipboard operation
openapi-to-postman copied to clipboard

Input not taking JSON as valid data

Open Zino-ctrlZ opened this issue 9 months ago • 4 comments

Hi, I'm making use of Converter.convert from openapi-to-postmanv2 in typescript running node20. The index.d.ts file has the data property in Input set to string. i.e in the build file,

export interface Input {
    type: "file" | "string" | "json";
    data: string;
}

so I'm getting an error when trying to pass an object to in in the data property, so the below fails

Converter.convert({type: "json", data:"data_as_json"},{}, ()=>{})

is there no support for passing data as json in node ?

Zino-ctrlZ avatar Jan 27 '25 23:01 Zino-ctrlZ