Add missing Patch case for safeLink
This commit is contained in:
parent
664691e1ba
commit
8b0ade729e
2 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
0.4.2
|
||||||
|
-----
|
||||||
|
* Fix missing cases for `Patch` in `safeLink`
|
||||||
|
|
||||||
0.4.1
|
0.4.1
|
||||||
-----
|
-----
|
||||||
* Allow whitespace after parsing JSON
|
* Allow whitespace after parsing JSON
|
||||||
|
|
|
@ -122,6 +122,7 @@ import Servant.API.Header ( Header )
|
||||||
import Servant.API.Get ( Get )
|
import Servant.API.Get ( Get )
|
||||||
import Servant.API.Post ( Post )
|
import Servant.API.Post ( Post )
|
||||||
import Servant.API.Put ( Put )
|
import Servant.API.Put ( Put )
|
||||||
|
import Servant.API.Patch ( Patch )
|
||||||
import Servant.API.Delete ( Delete )
|
import Servant.API.Delete ( Delete )
|
||||||
import Servant.API.Sub ( type (:>) )
|
import Servant.API.Sub ( type (:>) )
|
||||||
import Servant.API.Raw ( Raw )
|
import Servant.API.Raw ( Raw )
|
||||||
|
@ -178,6 +179,7 @@ type family IsElem endpoint api :: Constraint where
|
||||||
IsElem (Get ct typ) (Get ct' typ) = IsSubList ct ct'
|
IsElem (Get ct typ) (Get ct' typ) = IsSubList ct ct'
|
||||||
IsElem (Post ct typ) (Post ct' typ) = IsSubList ct ct'
|
IsElem (Post ct typ) (Post ct' typ) = IsSubList ct ct'
|
||||||
IsElem (Put ct typ) (Put ct' typ) = IsSubList ct ct'
|
IsElem (Put ct typ) (Put ct' typ) = IsSubList ct ct'
|
||||||
|
IsElem (Patch ct typ) (Patch ct' typ) = IsSubList ct ct'
|
||||||
IsElem (Delete ct typ) (Delete ct' typ) = IsSubList ct ct'
|
IsElem (Delete ct typ) (Delete ct' typ) = IsSubList ct ct'
|
||||||
IsElem e e = ()
|
IsElem e e = ()
|
||||||
IsElem e a = IsElem' e a
|
IsElem e a = IsElem' e a
|
||||||
|
@ -352,6 +354,10 @@ instance HasLink (Put y r) where
|
||||||
type MkLink (Put y r) = URI
|
type MkLink (Put y r) = URI
|
||||||
toLink _ = linkURI
|
toLink _ = linkURI
|
||||||
|
|
||||||
|
instance HasLink (Patch y r) where
|
||||||
|
type MkLink (Patch y r) = URI
|
||||||
|
toLink _ = linkURI
|
||||||
|
|
||||||
instance HasLink (Delete y r) where
|
instance HasLink (Delete y r) where
|
||||||
type MkLink (Delete y r) = URI
|
type MkLink (Delete y r) = URI
|
||||||
toLink _ = linkURI
|
toLink _ = linkURI
|
||||||
|
|
Loading…
Reference in a new issue