Skip to content

Commit

Permalink
[sc-36080] Better error on non-string enum
Browse files Browse the repository at this point in the history
  • Loading branch information
ysangkok committed Apr 9, 2024
1 parent 9ff6be9 commit 58ecb5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion json-fleece-openapi3/src/Fleece/OpenApi3.hs
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ enumValueToText schema value =
case OA._schemaNullable schema of
Just True -> pure Nothing
_ -> CGU.codeGenError "null listed as enum value in a non-nullable schema"
_ -> CGU.codeGenError "Non-string value found for enum"
_ -> CGU.codeGenError $ "Non-string value found for enum: " <> foldMap T.unpack (OA._schemaTitle schema)

mkOpenApiNumberFormat :: HC.TypeName -> OA.Schema -> CGU.CodeGen CGU.CodeGenDataFormat
mkOpenApiNumberFormat typeName schema = do
Expand Down

0 comments on commit 58ecb5b

Please sign in to comment.