diff --git a/src/Data/Swagger/Internal/Utils.hs b/src/Data/Swagger/Internal/Utils.hs index 1a2eff2..30e1f1c 100644 --- a/src/Data/Swagger/Internal/Utils.hs +++ b/src/Data/Swagger/Internal/Utils.hs @@ -45,6 +45,7 @@ swaggerFieldRules = defaultFieldRules & lensField %~ swaggerFieldNamer fixName' "enum" = "enum_" -- Control.Lens conflict fixName' "head" = "head_" -- Prelude conflict fixName' "not" = "not_" -- Prelude conflict + fixName' "server" = "server_" -- servant-swagger conflict fixName' n = n gunfoldEnum :: String -> [a] -> (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c a diff --git a/src/Data/Swagger/Lens.hs b/src/Data/Swagger/Lens.hs index 70b3083..4b9f714 100644 --- a/src/Data/Swagger/Lens.hs +++ b/src/Data/Swagger/Lens.hs @@ -59,7 +59,7 @@ makeFields ''ExternalDocs makeFields ''Encoding makeFields ''Example makeFields ''Discriminator -makeFields ''Link +makeLensesWith swaggerFieldRules ''Link -- * Prisms -- ** 'SecuritySchemeType' prisms