Skip to content

Commit 50d902c

Browse files
committed
fix(cts): friendly error message when test is missing
1 parent 4914844 commit 50d902c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

generators/src/main/java/com/algolia/codegen/cts/tests/TestsRequest.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,16 @@ public void run(Map<String, CodegenModel> models, Map<String, CodegenOperation>
5454
for (Map.Entry<String, CodegenOperation> entry : operations.entrySet()) {
5555
String operationId = entry.getKey();
5656
if (!cts.containsKey(operationId)) {
57-
throw new CTSException("operationId " + operationId + " does not exist in the spec");
57+
throw new CTSException(
58+
"operationId '" +
59+
operationId +
60+
"' does not exist in the tests suite, please create the file:" +
61+
" 'tests/CTS/methods/requests/" +
62+
client +
63+
"/" +
64+
operationId +
65+
".json'"
66+
);
5867
}
5968
Request[] op = cts.get(operationId);
6069

0 commit comments

Comments
 (0)