Open
Description
For binance-api-swagger/spot_api.yaml the section
aggTrade:
type: object
properties:
a:
type: integer
format: int64
description: Aggregate tradeId
example: 26129
p:
type: string
description: Price
example: "0.01633102"
q:
type: string
description: Quantity
example: "4.70443515"
f:
type: integer
format: int64
description: First tradeId
example: 27781
l:
type: integer
format: int64
description: Last tradeId
example: 27781
T:
type: boolean
description: Timestamp
example: 1498793709153
m:
type: boolean
description: Was the buyer the maker?
M:
type: boolean
description: Was the trade the best price match?
results in compilation error for generated files, as follows:
src/OpenAPI/Types/AggTrade.hs:51:5: error:
Multiple declarations of ‘aggTradeM’
Declared at: src/OpenAPI/Types/AggTrade.hs:41:3
src/OpenAPI/Types/AggTrade.hs:51:5
|
51 | , aggTradeM :: GHC.Types.Bool
| ^^^^^^^^^
(the problem apparently originates in the "m" and "M", for which case is not handled)
Generated Haskell code section:
-- | Defines the object schema located at @components.schemas.aggTrade@ in the specification.
--
--
data AggTrade = AggTrade {
-- | M: Was the trade the best price match?
aggTradeM :: GHC.Types.Bool
-- | T: Timestamp
, aggTradeT :: GHC.Types.Bool
-- | a: Aggregate tradeId
, aggTradeA :: GHC.Int.Int64
-- | f: First tradeId
, aggTradeF :: GHC.Int.Int64
-- | l: Last tradeId
, aggTradeL :: GHC.Int.Int64
-- | m: Was the buyer the maker?
, aggTradeM :: GHC.Types.Bool
-- | p: Price
, aggTradeP :: Data.Text.Internal.Text
-- | q: Quantity
, aggTradeQ :: Data.Text.Internal.Text
} deriving (GHC.Show.Show
, GHC.Classes.Eq)
Metadata
Metadata
Assignees
Labels
No labels