Closed hosseinmd closed 1 year ago
@hosseinmd not sure if I'm understanding this issue, could you please put some examples of collections and the corresponding open API transformation to show case this?
Thanks
const result = await postmanToOpenApi(postmanCollection, outputFile);
I need to 'result' be a JSON
You can use yamljs
to convert yaml
to json
You can use
yamljs
to convertyaml
tojson
This is not useful for this module
I personally found it very helpful. I am sorry if the workaround doesn't suit you. I am pretty sure, a Pull Request is highly appreciated :)
Hi @hosseinmd,
As per OpenApi specification "An OpenAPI document that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format." so I have add in version 2.6.0
i have implement a new configuration option outputFormat
for choose between json
or yaml
, yaml
is still the default option.
Take into consideration that the goal of this library is to create OpenAPI documents so the returning value is still a string
value but you can choose if the format in the string is yaml or json.
Best Regards.
We need JSON response instead of YAML.
Please return JSON in response and write YAML to file. YAML in response is not useful.