Skip to content

Commit

Permalink
fix(runner): fix gateway openapi generator output filename
Browse files Browse the repository at this point in the history
This commit ensures that the openapi generator script uses the correct
output filname when the `entrypoint` is set to `gateway`.
  • Loading branch information
rickstaa committed May 12, 2024
1 parent e48856d commit af3f97c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runner/gen_openapi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import argparse
import json
import os

import yaml
from app.main import app, use_route_names_as_operation_ids
Expand Down Expand Up @@ -81,7 +82,7 @@ def write_openapi(fname, entrypoint="runner"):
if entrypoint == "gateway":
print("Translating OpenAPI schema from 'runner' to 'gateway' entrypoint...")
openapi = translate_to_gateway(openapi)
fname = fname.replace(".yaml", "_gateway.yaml")
fname = os.path.splitext(fname)[0] + "_gateway" + os.path.splitext(fname)[1]

# Write OpenAPI schema to file.
with open(fname, "w") as f:
Expand Down

0 comments on commit af3f97c

Please sign in to comment.