Hoogle Search

Within LTS Haskell 24.25 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. renderValidationErrors :: (ToJSON a, ToSchema a) => (a -> [ValidationError]) -> a -> Maybe String

    swagger2 Data.Swagger.Internal.Schema.Validation

    Pretty print validation errors together with actual JSON and Swagger Schema (using encodePretty).

    >>> import Data.Aeson as Aeson
    
    >>> import Data.Foldable (traverse_)
    
    >>> import GHC.Generics
    
    >>> data Phone = Phone { value :: String } deriving (Generic)
    
    >>> data Person = Person { name :: String, phone :: Phone } deriving (Generic)
    
    >>> instance ToJSON Person where toJSON p = object [ "name" Aeson..= name p ]
    
    >>> instance ToSchema Phone
    
    >>> instance ToSchema Person
    
    >>> let person = Person { name = "John", phone = Phone "123456" }
    
    >>> traverse_ putStrLn $ renderValidationErrors validateToJSON person
    Validation against the schema fails:
    * property "phone" is required, but not found in "{\"name\":\"John\"}"
    
    JSON value:
    {
    "name": "John"
    }
    
    Swagger Schema:
    {
    "properties": {
    "name": {
    "type": "string"
    },
    "phone": {
    "$ref": "#/definitions/Phone"
    }
    },
    "required": [
    "name",
    "phone"
    ],
    "type": "object"
    }
    
    Swagger Description Context:
    {
    "Phone": {
    "properties": {
    "value": {
    "type": "string"
    }
    },
    "required": [
    "value"
    ],
    "type": "object"
    }
    }
    

  2. runValidation :: Validation s a -> Config -> s -> Result a

    swagger2 Data.Swagger.Internal.Schema.Validation

    No documentation available.

  3. renderValidationErrors :: (ToJSON a, ToSchema a) => (a -> [ValidationError]) -> a -> Maybe String

    swagger2 Data.Swagger.Schema.Validation

    Pretty print validation errors together with actual JSON and Swagger Schema (using encodePretty).

    >>> import Data.Aeson as Aeson
    
    >>> import Data.Foldable (traverse_)
    
    >>> import GHC.Generics
    
    >>> data Phone = Phone { value :: String } deriving (Generic)
    
    >>> data Person = Person { name :: String, phone :: Phone } deriving (Generic)
    
    >>> instance ToJSON Person where toJSON p = object [ "name" Aeson..= name p ]
    
    >>> instance ToSchema Phone
    
    >>> instance ToSchema Person
    
    >>> let person = Person { name = "John", phone = Phone "123456" }
    
    >>> traverse_ putStrLn $ renderValidationErrors validateToJSON person
    Validation against the schema fails:
    * property "phone" is required, but not found in "{\"name\":\"John\"}"
    
    JSON value:
    {
    "name": "John"
    }
    
    Swagger Schema:
    {
    "properties": {
    "name": {
    "type": "string"
    },
    "phone": {
    "$ref": "#/definitions/Phone"
    }
    },
    "required": [
    "name",
    "phone"
    ],
    "type": "object"
    }
    
    Swagger Description Context:
    {
    "Phone": {
    "properties": {
    "value": {
    "type": "string"
    }
    },
    "required": [
    "value"
    ],
    "type": "object"
    }
    }
    

  4. data RoleValidationFailedReason

    ghc-lib-parser GHC.Tc.Errors.Types

    No documentation available.

  5. TcRnRoleValidationFailed :: Role -> RoleValidationFailedReason -> TcRnMessage

    ghc-lib-parser GHC.Tc.Errors.Types

    TcRnRoleValidationFailed is an error indicating that a variable was assigned an invalid role by the inference algorithm. This is only performed with -dcore-lint.

  6. DeserializationErrorValidation :: String -> DeserializationError

    hackage-security Hackage.Security.JSON

    Some verification step failed

  7. DeserializationErrorValidation :: String -> DeserializationError

    hackage-security Hackage.Security.Server

    Some verification step failed

  8. jwtValidationSettings :: JWTAuth' (x :: Existence) (scheme :: Symbol) (m :: Type -> Type) e a -> JWTValidationSettings

    webgear-core WebGear.Core.Trait.Auth.JWT

    Settings to validate the JWT

  9. FULL_VALIDATION :: VALIDATION_MODE

    morpheus-graphql-app Data.Morpheus.App

    No documentation available.

  10. NeovimValidation :: ByteString -> NeovimExceptionGen

    nvim-hs Neovim.API.ByteString

    No documentation available.

Page 19 of many | Previous | Next