servant-hateoas 0.1.0 → 0.1.1
raw patch · 3 files changed
+19/−7 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Servant.Hateoas.Resource: -- | Associated type for this Content-Type
+ Servant.Hateoas.Resource: -- | List of all relations <tt>a</tt> has
Files
- CHANGELOG.md +6/−1
- servant-hateoas.cabal +5/−2
- src/Servant/Hateoas/Resource.hs +8/−4
CHANGELOG.md view
@@ -6,7 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [PVP versioning](https://pvp.haskell.org/). -## v0.0.1 _(2024-10-25)_+## v0.1.1 _(2024-10-25)_++### Changed+- Improved documentation++## v0.1.0 _(2024-10-25)_ ### Added - Released
servant-hateoas.cabal view
@@ -1,8 +1,11 @@ cabal-version: 3.0 name: servant-hateoas-version: 0.1.0+version: 0.1.1 synopsis: HATEOAS extension for servant-description: Create Resource-Representations for your types and make your API HATEOAS-compliant. Generic Resource-construction where possible, manual where ypu want.+description: Create Resource-Representations for your types and make your API HATEOAS-compliant.+ Resource construction is generic where possible and manually adjustable where required.+ Currently HAL+JSON is the only supported Content-Type, work for more is in progress.+ The ultimate goal is to generate an entirely HATEOAS-compliant API generically. license: BSD-3-Clause license-file: LICENSE author: Julian Bruder
src/Servant/Hateoas/Resource.hs view
@@ -43,11 +43,15 @@ -- | Types that have Hypermedia-Relations. class Related a where- type IdSelName a :: Symbol -- ^ Name of the record selector that holds the resources identifier- type GetOneApi a :: Type -- ^ Servant-Endpoint for retrieving one @a@ by its identifier- type CollectionName a :: Symbol -- ^ Name for collected values, defaults to @\"item\"@+ -- | Name of the record selector that holds the resources identifier+ type IdSelName a :: Symbol+ -- | Servant-Endpoint for retrieving one @a@ by its identifier+ type GetOneApi a :: Type+ -- | Name for collected values+ type CollectionName a :: Symbol type CollectionName a = "items"- type Relations a :: [HRel] -- ^ List of all relations @a@ has+ -- | List of all relations @a@ has+ type Relations a :: [HRel] -- | Class for deriving Hypermedia-Relations for types. type BuildRels :: Type -> [HRel] -> Type -> Constraint