Skip to content

Use logError for the client import error message. #294

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 2 commits into from
Sep 26, 2023
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 @@ -223,16 +223,9 @@ private void writeQueryParams(PathSegments pathSegments) {
}
}
if (clientImportError) {
writer.eol();
writer.append(" ; !Error! // Explicit @QueryParam(\"...\") required with @Client.Import").eol();
writer.append(" // generation when using @Client.Import on on interface that has already been compiled.").eol();
writer.append(" // We effectively lose the method argument names, they become arg0, arg1, arg2, arg3 etc.").eol();
writer.append(" // We need to use explicit @QueryParam(\"...\") on the interface method parameters").eol();
writer.append(" // to explicitly name the query parameters and header parameters etc and can no").eol();
writer.append(" // longer rely on the implied names [when the interface type has already been compiled].").eol();
writer.append(" //").eol();
writer.append(" // Refer to: https://avaje.io/http/client/import#error").eol();
writer.eol();
logError(
"Explicit @QueryParam/@Header annotations required when using @Client.Import on an interface that has already been compiled.",
method.element());
}
}

Expand Down