From f547a9610c689f1c15c56dd3006855bf6aebcaab Mon Sep 17 00:00:00 2001 From: Paolo Capriotti Date: Wed, 2 Jun 2021 07:50:32 +0200 Subject: [PATCH] Set swagger type of text schema --- libs/schema-profunctor/src/Data/Schema.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/schema-profunctor/src/Data/Schema.hs b/libs/schema-profunctor/src/Data/Schema.hs index 53d0f090122..da35c34b751 100644 --- a/libs/schema-profunctor/src/Data/Schema.hs +++ b/libs/schema-profunctor/src/Data/Schema.hs @@ -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 ::