Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype ConstDeclare env r a = ConstDeclare {
- runConstDeclare :: Declare env r
- newtype ObjectSchema a = ObjectSchema {}
- newtype TupleSchema a = TupleSchema {}
- newtype JSONSchema a = JSONSchema {}
- combineSchemas :: Referenced Schema -> Referenced Schema -> Schema
- getJSONRef :: forall a. FromJSON a => Proxy a -> Declare (Definitions Schema) (Referenced Schema)
- getRefDef :: Declare (Definitions Schema) NamedSchema -> Declare (Definitions Schema) (Referenced Schema)
- onlyUnnamed :: Schema -> JSONSchema a
- getFromNamed :: forall a. FromJSON a => Proxy a -> Declare (Definitions Schema) NamedSchema
- getToNamed :: forall a. ToJSON a => Proxy a -> Declare (Definitions Schema) NamedSchema
Documentation
newtype ConstDeclare env r a Source #
ConstDeclare | |
|
Instances
newtype ObjectSchema a Source #
Instances
newtype TupleSchema a Source #
Instances
newtype JSONSchema a Source #
Instances
Functor JSONSchema Source # | |
Defined in Jordan.OpenAPI.Internal fmap :: (a -> b) -> JSONSchema a -> JSONSchema b # (<$) :: a -> JSONSchema b -> JSONSchema a # | |
Contravariant JSONSchema Source # | |
Defined in Jordan.OpenAPI.Internal contramap :: (a -> b) -> JSONSchema b -> JSONSchema a # (>$) :: b -> JSONSchema b -> JSONSchema a # | |
JSONParser JSONSchema Source # | |
Defined in Jordan.OpenAPI.Internal parseObject :: Text -> (forall (objectParser :: Type -> Type). JSONObjectParser objectParser => objectParser a) -> JSONSchema a parseObjectStrict :: Text -> (forall (objectParser :: Type -> Type). JSONObjectParser objectParser => objectParser a) -> JSONSchema a parseDictionary :: (forall (jsonParser :: Type -> Type). JSONParser jsonParser => jsonParser a) -> JSONSchema [(Text, a)] parseTextConstant :: Text -> JSONSchema () parseTuple :: (forall (arrayParser :: Type -> Type). JSONTupleParser arrayParser => arrayParser o) -> JSONSchema o parseArray :: FromJSON a => JSONSchema [a] parseArrayWith :: (forall (jsonParser :: Type -> Type). JSONParser jsonParser => jsonParser a) -> JSONSchema [a] parseNumber :: JSONSchema Scientific parseNull :: JSONSchema () validateJSON :: JSONSchema (Either Text a) -> JSONSchema a | |
JSONSerializer JSONSchema Source # | |
Defined in Jordan.OpenAPI.Internal serializeObject :: Text -> (forall (objSerializer :: Type -> Type). JSONObjectSerializer objSerializer => objSerializer a) -> JSONSchema a serializeDictionary :: Foldable t => (forall (jsonSerializer :: Type -> Type). JSONSerializer jsonSerializer => jsonSerializer a) -> JSONSchema (t (Text, a)) serializeText :: JSONSchema Text serializeTextConstant :: Text -> JSONSchema a serializeNull :: JSONSchema any serializeNumber :: JSONSchema Scientific serializeBool :: JSONSchema Bool serializeTuple :: (forall (tupleSerializer :: Type -> Type). JSONTupleSerializer tupleSerializer => tupleSerializer a) -> JSONSchema a serializeArray :: ToJSON a => JSONSchema [a] | |
Selectable JSONSchema Source # | |
Defined in Jordan.OpenAPI.Internal giveUp :: (arg -> Void) -> JSONSchema arg select :: (arg -> Either lhs rhs) -> JSONSchema lhs -> JSONSchema rhs -> JSONSchema arg | |
Semigroup (JSONSchema a) Source # | |
Defined in Jordan.OpenAPI.Internal (<>) :: JSONSchema a -> JSONSchema a -> JSONSchema a # sconcat :: NonEmpty (JSONSchema a) -> JSONSchema a # stimes :: Integral b => b -> JSONSchema a -> JSONSchema a # | |
Monoid (JSONSchema a) Source # | Empty instance: must be both a boolean and a text value, which is not possible (obviously!) |
Defined in Jordan.OpenAPI.Internal mempty :: JSONSchema a # mappend :: JSONSchema a -> JSONSchema a -> JSONSchema a # mconcat :: [JSONSchema a] -> JSONSchema a # |
combineSchemas :: Referenced Schema -> Referenced Schema -> Schema Source #
getJSONRef :: forall a. FromJSON a => Proxy a -> Declare (Definitions Schema) (Referenced Schema) Source #
getRefDef :: Declare (Definitions Schema) NamedSchema -> Declare (Definitions Schema) (Referenced Schema) Source #
onlyUnnamed :: Schema -> JSONSchema a Source #
getFromNamed :: forall a. FromJSON a => Proxy a -> Declare (Definitions Schema) NamedSchema Source #
Get documentation for a type that implements FromJSON
getToNamed :: forall a. ToJSON a => Proxy a -> Declare (Definitions Schema) NamedSchema Source #
Get documentation for a type that implements ToJSON