Skip to content

Commit cd0fa09

Browse files
Update scripts/validate-openapi-contract.mjs
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 2d6dc5e commit cd0fa09

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

scripts/validate-openapi-contract.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ function main() {
7474
return;
7575
}
7676

77+
} catch (error) {
78+
fail([`${rel} is not valid JSON: ${error.message}`]);
79+
return;
80+
}
81+
7782
if (!spec || typeof spec !== "object" || Array.isArray(spec)) {
7883
fail([`${rel} is not a valid OpenAPI object`]);
7984
return;

0 commit comments

Comments
 (0)