servant-auth-token-api-0.4.2.0: Servant based API for token based authorisation

Copyright(c) Anton Gushcha 2016
LicenseMIT
Maintainerncrashed@gmail.com
Stabilityexperimental
PortabilityPortable
Safe HaskellNone
LanguageHaskell2010

Servant.API.Auth.Token.Internal.Schema

Description

Common usage:

data PagedList i a = PagedList {
  pagedListItems :: ![a] -- ^ Payload
, pagedListPages :: !Word -- ^ Count of available pages
} deriving (Generic, Show)

instance (ToSchema i, ToSchema a) => ToSchema (PagedList i a) where 
  declareNamedSchema = genericDeclareNamedSchema $
    schemaOptionsDropPrefix "pagedList"

Synopsis

Documentation

schemaOptionsDropPrefix :: String -> SchemaOptions Source #

Strip given prefix from fields