Skip to content

Commit

Permalink
Set swagger type of text schema (#1561)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcapriotti authored Jun 2, 2021
1 parent 959fc08 commit e8ec6f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/schema-profunctor/src/Data/Schema.hs
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,11 @@ text :: Text -> ValueSchema NamedSwaggerDoc Text
text name =
named name $
mkSchema
(pure mempty)
(pure d)
(A.withText (T.unpack name) pure)
(pure . A.String)
where
d = mempty & S.type_ ?~ S.SwaggerString

-- | A schema for a textual value with possible failure.
parsedText ::
Expand Down

0 comments on commit e8ec6f6

Please sign in to comment.