Haskell-OpenAPI-Code-Generator / Haskell-OpenAPI-Client-Code-Generator

Generate Haskell client code from an OpenAPI 3 specification
46 stars 19 forks source link

hs-boot file fails to build for type named "Value" #107

Closed chris-martin closed 4 months ago

chris-martin commented 4 months ago

I just tried generating code for an OpenAPI spec and the result I get includes a file MyApiName/Types/Value.hs-boot that looks like this:

module MyApiName.Types.Value where
import Data.Aeson
import qualified Data.Aeson as Data.Aeson.Types.Internal
import qualified MyApiName.Common
data Value
instance Show Value
instance Eq Value
instance FromJSON Value
instance ToJSON Value

This doesn't build because the Value type conflicts with the type of the same name from Data.Aeson. I presume the solution here is to import Aeson qualified, like the corresponding .hs file does.