For sure if you have different @spec for specific implementation than @callback then you should use @spec. It’s important to let other knows that you will not meet exactly all cases expected by @behaviour. Otherwise I suggest delegating to callback documentation as I have mentioned previously. For dialyzer it’s ok probably because both arguments and return value match @callback specification - only small part, but matches.






















