diff --git a/tools/contracts-check.py b/tools/contracts-check.py index 52010a9..4c13a8c 100755 --- a/tools/contracts-check.py +++ b/tools/contracts-check.py @@ -1471,7 +1471,7 @@ def check_openapi(): lines = f.read().splitlines() text = "\n".join(lines) head_ok = (re.search(r"^openapi: 3\.1\.0$", text, re.M) and re.search(r"^ title: Kvitt$", text, re.M) - and re.search(r"^ version: '1'$", text, re.M) and "url: https://icehack.asuscomm.com:8443" in text) + and re.search(r"^ version: '1'$", text, re.M) and re.search(r"^ - url: https://\{host\}:8443\n variables:\n host:\n default: kvitt\.example\.invalid$", text, re.M)) report(bool(head_ok), "openapi header (3.1.0, title Kvitt, version 1, one server)", "" if head_ok else "header fields differ from §14.3") sec_ok = re.search(r"^ device:\n type: http\n scheme: bearer$", text, re.M) is not None report(sec_ok, "openapi security scheme device = HTTP bearer (§8.2)", "" if sec_ok else "components.securitySchemes.device not found")