Closed kurellajunior closed 1 week ago
hi @kurellajunior
We will see where it these quotes gets removed. We are using the @stoplight/yaml package to parse and write the YAML files, so it might be related to the conversion happening.
Either way, we will look into it.
hi @kurellajunior
We just released openapi-format 1.17.1, which includes an enhancement to keep the quotes for $ref elements. Try it out and feel free let me know if the issue is gone or not.
Hi end wow @thim81 ! Updated and run it in our project. Works. Immediately removed my sed postprocessing command :grin:
hi @kurellajunior
The yaml.safeStringify function from the @stoplight/yaml package removed the quotes. I had to add a specific patch to overcome it, so not all edge cases might be covered but I'll keep an eye out for any cases discovered.
Thanks for taking your time to report the issue, allowing to make openapi-format better for all users. Much appreciated 🤝
when having anything like
opanapi-format will remove the quotes, leading to an invalid yaml, which in turn most Editors they fail to resolve the ref ( because everything after the # is a comment)
local references
$ref: "#/components/schemas/Exetrn"
keep their quotes, so i assume it is a simple oversight somewhere