Assert text files are in utf8 (#350)

Read and write text files with utf8 encoding.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
Bobby Noelte
2025-01-07 19:31:44 +01:00
committed by GitHub
parent ef60f5b9f5
commit d2f6e9866d
7 changed files with 14 additions and 14 deletions

View File

@@ -54,7 +54,7 @@ def main():
openapi_spec_str = json.dumps(openapi_spec, indent=2)
if args.output_file:
# Write to file
with open(args.output_file, "w") as f:
with open(args.output_file, "w", encoding="utf8") as f:
f.write(openapi_spec_str)
else:
# Write to std output