Skip to content
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

Inline generated code for validation language #265

Merged
merged 1 commit into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
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 @@ -283,10 +283,8 @@ void writeValidate(Append writer) {
if (!contextType && typeHandler == null) {
final var indent = platform().indent();
if (useValidation) {
writer.append("%s var validLanguage = ", indent);
writer.append("%s validator.validate(%s, ", indent, varName);
platform().writeAcceptLanguage(writer);
writer.append(";").eol();
writer.append("%s validator.validate(%s, validLanguage", indent, varName);
validationGroups.forEach(g -> writer.append(", %s", Util.shortName(g)));
writer.append(");").eol();
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
class ControllerWriter extends BaseControllerWriter {

private static final String AT_GENERATED = "@Generated(\"avaje-helidon-nima-generator\")";
private static final String AT_GENERATED = "@Generated(\"avaje-helidon-generator\")";
private final boolean useJsonB;
private final Map<String, UType> jsonTypes;

Expand Down