Skip to content

Commit b33c7ef

Browse files
committed
build: throw error if component schema not found
1 parent b7fe5b6 commit b33c7ef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/overrides/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ function replaceOperation(
6565
}
6666

6767
function replaceSchema(schema, schemaName, overridePath) {
68+
if (!schema.components.schemas[schemaName]) {
69+
throw `Component schema ${schemaName} not found in schema`;
70+
}
71+
6872
schema.components.schemas[schemaName] = JSON.parse(
6973
readFileSync(resolve(join(__dirname, overridePath)), "utf8"),
7074
);

0 commit comments

Comments
 (0)