Skip to content

Commit 665bb3c

Browse files
committed
optional field with default value
1 parent c786101 commit 665bb3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/wire-api/src/Wire/API/User/Activation.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ instance ToSchema ActivationResponse where
182182
Schema.objectWithDocModifier "ActivationResponse" (description ?~ "Response body of a successful activation request") $
183183
ActivationResponse
184184
<$> activatedIdentity Schema..= userIdentityObjectSchema
185-
<*> activatedFirst Schema..= Schema.fieldWithDocModifier "first" (description ?~ "Whether this is the first successful activation (i.e. account activation).") Schema.schema
185+
<*> activatedFirst Schema..= (fromMaybe False <$> Schema.optFieldWithDocModifier "first" (description ?~ "Whether this is the first successful activation (i.e. account activation).") Schema.schema)
186186

187187
modelActivationResponse :: Doc.Model
188188
modelActivationResponse = Doc.defineModel "ActivationResponse" $ do

0 commit comments

Comments
 (0)