This commit is contained in:
imperosol
2025-04-21 20:37:01 +02:00
parent ca31584ce1
commit 5788c1a8b3
17 changed files with 429 additions and 136 deletions

View File

@ -182,13 +182,12 @@ class OpenApi:
path[action]["operationId"] = "_".join(
desc["operationId"].split("_")[:-1]
)
schema = str(schema)
if old_hash == sha1(schema.encode("utf-8")).hexdigest():
logging.getLogger("django").info("✨ Api did not change, nothing to do ✨")
return
with open(out, "w") as f:
_ = f.write(schema)
out.write_text(schema)
return subprocess.Popen(["npm", "run", "openapi"])