mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-25 19:31:44 +03:00
api: add support for swagger2 2.1.5+ (fixes #612)
This commit is contained in:
parent
0b7a50d0f0
commit
4be996ba89
@ -60,7 +60,7 @@ executable hledger-api
|
||||
, safe
|
||||
, servant-server >= 0.10
|
||||
, servant-swagger
|
||||
, swagger2 >= 2.0 && < 2.1.5
|
||||
, swagger2 >= 2.0 && < 2.2
|
||||
, text
|
||||
, transformers
|
||||
, wai
|
||||
|
@ -1,3 +1,4 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
@ -212,6 +213,9 @@ instance ToSchema Side
|
||||
instance ToSchema DigitGroupStyle
|
||||
instance ToSchema MixedAmount
|
||||
instance ToSchema Price
|
||||
#if MIN_VERSION_swagger2(2,1,5)
|
||||
where declareNamedSchema = genericDeclareNamedSchemaUnrestricted defaultSchemaOptions
|
||||
#endif
|
||||
instance ToSchema MarketPrice
|
||||
instance ToSchema PostingType
|
||||
instance ToSchema Posting
|
||||
|
@ -46,7 +46,7 @@ dependencies:
|
||||
- safe
|
||||
- servant-server >= 0.10
|
||||
- servant-swagger
|
||||
- swagger2 >= 2.0 && < 2.1.5
|
||||
- swagger2 >= 2.0 && < 2.2
|
||||
- text
|
||||
- transformers
|
||||
- wai
|
||||
|
Loading…
Reference in New Issue
Block a user