@@ -135,6 +135,7 @@ instance ToSchema a => ToSchema (Dual a) where toNamedSchema _ = unnamed $ to
135135
136136data SchemaOptions = SchemaOptions
137137 { fieldLabelModifier :: String -> String
138+ , constructorTagModifier :: String -> String
138139 , datatypeNameModifier :: String -> String
139140 , useReferences :: Bool
140141 , unwrapUnaryRecords :: Bool
@@ -143,6 +144,7 @@ data SchemaOptions = SchemaOptions
143144defaultSchemaOptions :: SchemaOptions
144145defaultSchemaOptions = SchemaOptions
145146 { fieldLabelModifier = id
147+ , constructorTagModifier = id
146148 , datatypeNameModifier = id
147149 , useReferences = True
148150 , unwrapUnaryRecords = False
@@ -262,7 +264,7 @@ gsumConToSchema tagSchemaRef opts _ schema = schema
262264 & schemaMaxProperties ?~ 1
263265 & schemaMinProperties ?~ 1
264266 where
265− tag = T.pack (conName (Proxy3 :: Proxy3 c f p))
267+ tag = T.pack (constructorTagModifier opts (conName (Proxy3 :: Proxy3 c f p)))
266268
267269instance {-# OVERLAPPABLE #-} (Constructor c, GToSchema f) => GSumToSchema (C1 c f) where
268270 gsumToSchema opts = gsumConToSchema tagSchemaRef opts