@@ -157,7 +157,7 @@ defmodule Astarte.Core.Generators.Mapping do
157157 @ spec reliability ( :datastream | :properties ) ::
158158 StreamData . t ( :unreliable | :guaranteed | :unique | nil )
159159 def reliability ( :datastream ) , do: member_of ( [ :unreliable , :guaranteed , :unique ] )
160- def reliability ( _ ) , do: nil
160+ def reliability ( _ ) , do: constant ( nil )
161161
162162 @ doc false
163163 @ spec explicit_timestamp ( :datastream | :properties ) :: StreamData . t ( boolean ( ) )
@@ -170,21 +170,21 @@ defmodule Astarte.Core.Generators.Mapping do
170170 def retention ( _ ) , do: constant ( :discard )
171171
172172 @ doc false
173- @ spec expiry ( :datastream | :properties ) :: StreamData . t ( 0 | pos_integer ( ) )
173+ @ spec expiry ( :datastream | :properties ) :: StreamData . t ( pos_integer ( ) | 0 )
174174 def expiry ( :datastream ) , do: one_of ( [ constant ( 0 ) , integer ( 1 .. 10_000 ) ] )
175175 def expiry ( _ ) , do: constant ( 0 )
176176
177177 @ doc false
178178 @ spec database_retention_policy ( :datastream | :properties ) ::
179179 StreamData . t ( :no_ttl | :use_ttl | nil )
180180 def database_retention_policy ( :datastream ) , do: member_of ( [ :no_ttl , :use_ttl ] )
181- def database_retention_policy ( _ ) , do: nil
181+ def database_retention_policy ( _ ) , do: constant ( nil )
182182
183183 @ doc false
184184 @ spec database_retention_ttl ( :datastream | :properties , :use_ttl | :no_ttl ) ::
185185 StreamData . t ( non_neg_integer ( ) | nil )
186186 def database_retention_ttl ( :datastream , :use_ttl ) , do: integer ( 60 .. 1_048_576 )
187- def database_retention_ttl ( _ , _ ) , do: nil
187+ def database_retention_ttl ( _ , _ ) , do: constant ( nil )
188188
189189 @ doc false
190190 @ spec allow_unset ( :datastream | :properties ) :: StreamData . t ( boolean ( ) )
0 commit comments