Skip to content

Commit

Permalink
fix: サポート済みじゃないとハッシュが更新されない
Browse files Browse the repository at this point in the history
  • Loading branch information
yupix committed Feb 2, 2024
1 parent b69b47d commit 29f565e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions compiler/update_api_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,12 @@ def get_sha256_hash(data: dict[str, Any]):
}
else:
current_hash = get_sha256_hash(api['components']['schemas'][schema])
if current_hash != old_data['hash'] and endpoints['schemas'][schema]['status'] == "supported":
if current_hash != old_data['hash']:
print(f"{COLORS.green}[CHANGED: SCHEMA] changed schema hash {COLORS.reset} {schema} {COLORS.reset}")
endpoints['schemas'][schema]['hash'] = current_hash
endpoints['schemas'][schema]['status'] = "needToWork"

if endpoints['schemas'][schema]['status'] == "supported": # サポート済みの場合のみステータスを変更する
endpoints['schemas'][schema]['status'] = "needToWork"


with open('./datas/endpoints.json', mode='w', encoding='utf-8') as f:
Expand Down

0 comments on commit 29f565e

Please sign in to comment.