prolude-0.0.0.23: ITProTV's custom prelude
Safe HaskellNone
LanguageHaskell2010

Prolude.Swagger

Synopsis

SwaggerType re-export

data SwaggerType (t :: SwaggerKind Type) where #

Instances

Instances details
HasType ParamOtherSchema (Maybe (SwaggerType ('SwaggerKindParamOtherSchema :: SwaggerKind Type))) 
Instance details

Defined in Data.Swagger.Lens

HasType Schema (Maybe (SwaggerType ('SwaggerKindSchema :: SwaggerKind Type))) 
Instance details

Defined in Data.Swagger.Lens

HasType NamedSchema (Maybe (SwaggerType ('SwaggerKindSchema :: SwaggerKind Type))) 
Instance details

Defined in Data.Swagger.Lens

HasType Header (Maybe (SwaggerType ('SwaggerKindNormal Header))) 
Instance details

Defined in Data.Swagger.Lens

Eq (SwaggerType t) 
Instance details

Defined in Data.Swagger.Internal

Data (SwaggerType ('SwaggerKindSchema :: SwaggerKind Type)) 
Instance details

Defined in Data.Swagger.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SwaggerType 'SwaggerKindSchema -> c (SwaggerType 'SwaggerKindSchema) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SwaggerType 'SwaggerKindSchema) #

toConstr :: SwaggerType 'SwaggerKindSchema -> Constr #

dataTypeOf :: SwaggerType 'SwaggerKindSchema -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (SwaggerType 'SwaggerKindSchema)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SwaggerType 'SwaggerKindSchema)) #

gmapT :: (forall b. Data b => b -> b) -> SwaggerType 'SwaggerKindSchema -> SwaggerType 'SwaggerKindSchema #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SwaggerType 'SwaggerKindSchema -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SwaggerType 'SwaggerKindSchema -> r #

gmapQ :: (forall d. Data d => d -> u) -> SwaggerType 'SwaggerKindSchema -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SwaggerType 'SwaggerKindSchema -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SwaggerType 'SwaggerKindSchema -> m (SwaggerType 'SwaggerKindSchema) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SwaggerType 'SwaggerKindSchema -> m (SwaggerType 'SwaggerKindSchema) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SwaggerType 'SwaggerKindSchema -> m (SwaggerType 'SwaggerKindSchema) #

Data (SwaggerType ('SwaggerKindParamOtherSchema :: SwaggerKind Type)) 
Instance details

Defined in Data.Swagger.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SwaggerType 'SwaggerKindParamOtherSchema -> c (SwaggerType 'SwaggerKindParamOtherSchema) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SwaggerType 'SwaggerKindParamOtherSchema) #

toConstr :: SwaggerType 'SwaggerKindParamOtherSchema -> Constr #

dataTypeOf :: SwaggerType 'SwaggerKindParamOtherSchema -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (SwaggerType 'SwaggerKindParamOtherSchema)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SwaggerType 'SwaggerKindParamOtherSchema)) #

gmapT :: (forall b. Data b => b -> b) -> SwaggerType 'SwaggerKindParamOtherSchema -> SwaggerType 'SwaggerKindParamOtherSchema #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SwaggerType 'SwaggerKindParamOtherSchema -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SwaggerType 'SwaggerKindParamOtherSchema -> r #

gmapQ :: (forall d. Data d => d -> u) -> SwaggerType 'SwaggerKindParamOtherSchema -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SwaggerType 'SwaggerKindParamOtherSchema -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SwaggerType 'SwaggerKindParamOtherSchema -> m (SwaggerType 'SwaggerKindParamOtherSchema) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SwaggerType 'SwaggerKindParamOtherSchema -> m (SwaggerType 'SwaggerKindParamOtherSchema) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SwaggerType 'SwaggerKindParamOtherSchema -> m (SwaggerType 'SwaggerKindParamOtherSchema) #

Typeable t => Data (SwaggerType ('SwaggerKindNormal t)) 
Instance details

Defined in Data.Swagger.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SwaggerType ('SwaggerKindNormal t) -> c (SwaggerType ('SwaggerKindNormal t)) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SwaggerType ('SwaggerKindNormal t)) #

toConstr :: SwaggerType ('SwaggerKindNormal t) -> Constr #

dataTypeOf :: SwaggerType ('SwaggerKindNormal t) -> DataType #

dataCast1 :: Typeable t0 => (forall d. Data d => c (t0 d)) -> Maybe (c (SwaggerType ('SwaggerKindNormal t))) #

dataCast2 :: Typeable t0 => (forall d e. (Data d, Data e) => c (t0 d e)) -> Maybe (c (SwaggerType ('SwaggerKindNormal t))) #

gmapT :: (forall b. Data b => b -> b) -> SwaggerType ('SwaggerKindNormal t) -> SwaggerType ('SwaggerKindNormal t) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SwaggerType ('SwaggerKindNormal t) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SwaggerType ('SwaggerKindNormal t) -> r #

gmapQ :: (forall d. Data d => d -> u) -> SwaggerType ('SwaggerKindNormal t) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SwaggerType ('SwaggerKindNormal t) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SwaggerType ('SwaggerKindNormal t) -> m (SwaggerType ('SwaggerKindNormal t)) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SwaggerType ('SwaggerKindNormal t) -> m (SwaggerType ('SwaggerKindNormal t)) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SwaggerType ('SwaggerKindNormal t) -> m (SwaggerType ('SwaggerKindNormal t)) #

Show (SwaggerType t) 
Instance details

Defined in Data.Swagger.Internal

ToJSON (SwaggerType t) 
Instance details

Defined in Data.Swagger.Internal

FromJSON (SwaggerType ('SwaggerKindSchema :: SwaggerKind Type)) 
Instance details

Defined in Data.Swagger.Internal

FromJSON (SwaggerType ('SwaggerKindParamOtherSchema :: SwaggerKind Type)) 
Instance details

Defined in Data.Swagger.Internal

FromJSON (SwaggerType ('SwaggerKindNormal t)) 
Instance details

Defined in Data.Swagger.Internal

SwaggerMonoid (SwaggerType t) 
Instance details

Defined in Data.Swagger.Internal

AesonDefaultValue (SwaggerType a) 
Instance details

Defined in Data.Swagger.Internal

HasType (ParamSchema t) (Maybe (SwaggerType t)) 
Instance details

Defined in Data.Swagger.Lens

Alias types

Functions

defaultDeclareNamedSchema :: (Typeable a, Applicative f) => (Schema -> Schema) -> proxy a -> f NamedSchema Source #

This function makes it easy to define a ToSchema instance. Just pass in a function that modifies the default empty schema and you're good to go. For example:

instance ToSchema SomeType where
  declareNamedSchema = defaultDeclareNamedSchema
    $ set type_ (Just SwaggerObject)
    . set title (Just "some type")

nameSchema :: Typeable a => proxy a -> Schema -> NamedSchema Source #

Generates a unique name for the given type and adds that name to the schema. The generated name will be like ModuleName.TypeName. For example it might be Data.Maybe.Maybe.