diff --git a/src/ndto_generator.erl b/src/ndto_generator.erl index be5a528..df85ef1 100644 --- a/src/ndto_generator.erl +++ b/src/ndto_generator.erl @@ -463,7 +463,7 @@ is_valid(Prefix, #{one_of := Subschemas} = Schema) when is_list(Subschemas) -> none, [ erl_syntax:case_expr( - hd(chain_conditions(FunName, ValidationConditions, 'xor')), + erlang:hd(chain_conditions(FunName, ValidationConditions, 'xor')), [ erl_syntax:clause( [erl_syntax:atom('true')], @@ -583,7 +583,7 @@ is_valid(Prefix, #{any_of := Subschemas} = Schema) when is_list(Subschemas) -> none, [ erl_syntax:case_expr( - hd(chain_conditions(FunName, ValidationConditions, 'orelse', true)), + erlang:hd(chain_conditions(FunName, ValidationConditions, 'orelse', true)), [ erl_syntax:clause( [erl_syntax:atom('true')], @@ -661,7 +661,7 @@ is_valid(Prefix, #{all_of := Subschemas} = Schema) when is_list(Subschemas) -> none, [ erl_syntax:case_expr( - hd(chain_conditions(FunName, ValidationConditions, 'andalso', true)), + erlang:hd(chain_conditions(FunName, ValidationConditions, 'andalso', true)), [ erl_syntax:clause( [erl_syntax:atom('true')], @@ -2615,7 +2615,7 @@ chain_conditions(FunName, ValidationConditions, Operator) -> chain_conditions(FunName, ValidationConditions, 'andalso', false) -> [ erl_syntax:case_expr( - hd(chain_conditions(FunName, ValidationConditions, 'andalso', true)), + erlang:hd(chain_conditions(FunName, ValidationConditions, 'andalso', true)), [ erl_syntax:clause( [erl_syntax:atom('true')], diff --git a/test/ndto_SUITE.erl b/test/ndto_SUITE.erl index 3149415..be0b675 100644 --- a/test/ndto_SUITE.erl +++ b/test/ndto_SUITE.erl @@ -168,7 +168,7 @@ nullable(_Conf) -> DTO2 = ndto:generate(test_nullable2, Schema2), ok = ndto:load(DTO2), - <> = TypeBin = atom_to_binary(Type), + <> = TypeBin = erlang:atom_to_binary(Type), Article = case Char of Vocal when Vocal =:= <<"a">>; Vocal =:= <<"o">>; Vocal =:= <<"i">> ->