diff --git a/lib/manageiq/api/open_api/generator.rb b/lib/manageiq/api/open_api/generator.rb index 5573f752bb..c32462cd79 100644 --- a/lib/manageiq/api/open_api/generator.rb +++ b/lib/manageiq/api/open_api/generator.rb @@ -20,7 +20,7 @@ def initialize def generate! openapi_spec["components"]["schemas"] = build_schemas - File.write(openapi_path, "#{JSON.pretty_generate(openapi_spec)}\n") + openapi_path.write("#{JSON.pretty_generate(openapi_spec)}\n") end private