Skip to content

fix(cts): friendly error message when a paremeter is not recognized #978

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,10 @@ private void handleModel(
entry.getKey() +
"' not found in '" +
paramName +
"'. You might have a type conflict in the spec for '" +
"'. Available properties are: " +
spec.getVars().stream().map(v -> v.baseName).collect(Collectors.joining(", ")) +
(spec.getAdditionalPropertiesIsAnyType() ? " (and any additional properties)" : "") +
". Or you might have a type conflict in the spec for '" +
baseType +
"'"
);
Expand Down Expand Up @@ -545,6 +548,7 @@ private IJsonSchemaValidationProperties findMatchingOneOf(Object param, CodegenM

// Somehow this is not yet enough
if (oneOf != null && !oneOf.isEmpty()) {
System.out.println("Choosing the first oneOf by default: " + oneOf.get(0).name + " (this won't stay correct forever)");
return oneOf.get(0);
}
}
Expand Down