compaREST-0.1.0.1: Compatibility checker for OpenAPI
Safe HaskellNone
LanguageHaskell2010

Data.OpenApi.Compare.Subtree

Synopsis

Documentation

class (Typeable Step, Typeable a, Typeable b, Ord (Step a b), Show (Step a b)) => Steppable (a :: Type) (b :: Type) Source #

Associated Types

data Step a b :: Type Source #

How to get from an a node to a b node

Instances

Instances details
Steppable OpenApi ProcessedPathItems Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.OpenApi

Associated Types

data Step OpenApi ProcessedPathItems Source #

Steppable RequestBody MediaTypeObject Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.RequestBody

Associated Types

data Step RequestBody MediaTypeObject Source #

Steppable MediaTypeObject Encoding Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.MediaTypeObject

Associated Types

data Step MediaTypeObject Encoding Source #

Steppable Schema Discriminator Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Schema.Traced

Associated Types

data Step Schema Discriminator Source #

Steppable Response MediaTypeObject Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Responses

Associated Types

data Step Response MediaTypeObject Source #

Steppable Callback ProcessedPathItems Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Operation

Associated Types

data Step Callback ProcessedPathItems Source #

Steppable SecuritySchemeType OAuth2Flows Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.SecurityScheme

Steppable SecurityScheme SecuritySchemeType Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.SecurityScheme

Steppable TraceRoot OpenApi Source # 
Instance details

Defined in Data.OpenApi.Compare.Subtree

Associated Types

data Step TraceRoot OpenApi Source #

Steppable MatchedOperation Responses Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Operation

Associated Types

data Step MatchedOperation Responses Source #

Steppable MatchedOperation SecurityRequirement Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Operation

Steppable OpenApi (Definitions RequestBody) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.OpenApi

Associated Types

data Step OpenApi (Definitions RequestBody) Source #

Steppable OpenApi (Definitions Param) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.OpenApi

Associated Types

data Step OpenApi (Definitions Param) Source #

Steppable OpenApi (Definitions Link) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.OpenApi

Associated Types

data Step OpenApi (Definitions Link) Source #

Steppable OpenApi (Definitions Schema) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.OpenApi

Associated Types

data Step OpenApi (Definitions Schema) Source #

Steppable OpenApi (Definitions Response) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.OpenApi

Associated Types

data Step OpenApi (Definitions Response) Source #

Steppable OpenApi (Definitions Callback) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.OpenApi

Associated Types

data Step OpenApi (Definitions Callback) Source #

Steppable OpenApi (Definitions Header) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.OpenApi

Associated Types

data Step OpenApi (Definitions Header) Source #

Steppable OpenApi (Definitions SecurityScheme) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.OpenApi

Steppable MediaTypeObject (Definitions Encoding) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.MediaTypeObject

Steppable MediaTypeObject (Referenced Schema) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.MediaTypeObject

Associated Types

data Step MediaTypeObject (Referenced Schema) Source #

Steppable Encoding (Definitions (Referenced Header)) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.MediaTypeObject

Associated Types

data Step Encoding (Definitions (Referenced Header)) Source #

Steppable Param (Referenced Schema) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Param

Associated Types

data Step Param (Referenced Schema) Source #

Steppable Schema (Definitions (Referenced Schema)) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Schema.Traced

Associated Types

data Step Schema (Definitions (Referenced Schema)) Source #

Steppable Schema (Referenced Schema) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Schema.Traced

Associated Types

data Step Schema (Referenced Schema) Source #

Steppable Discriminator (Definitions (Referenced Schema)) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Schema.Traced

Steppable Responses (Referenced Response) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Responses

Associated Types

data Step Responses (Referenced Response) Source #

Steppable Response (Definitions (Referenced Link)) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Responses

Associated Types

data Step Response (Definitions (Referenced Link)) Source #

Steppable Response (Definitions (Referenced Header)) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Responses

Associated Types

data Step Response (Definitions (Referenced Header)) Source #

Steppable Response (Referenced Header) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Responses

Associated Types

data Step Response (Referenced Header) Source #

Steppable Header (Referenced Schema) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Header

Associated Types

data Step Header (Referenced Schema) Source #

Typeable t => Steppable OAuth2Flows (OAuth2Flow t) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.OAuth2Flows

Associated Types

data Step OAuth2Flows (OAuth2Flow t) Source #

Steppable MatchedOperation [Server] Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Operation

Associated Types

data Step MatchedOperation [Server] Source #

Steppable MatchedOperation (Referenced RequestBody) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Operation

Steppable MatchedOperation (Referenced Param) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Operation

Associated Types

data Step MatchedOperation (Referenced Param) Source #

Steppable MatchedOperation (Referenced Callback) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Operation

Steppable RequestBody (InsOrdHashMap MediaType MediaTypeObject) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.RequestBody

Steppable Responses (InsOrdHashMap HttpStatusCode (Referenced Response)) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Responses

Steppable Response (InsOrdHashMap MediaType MediaTypeObject) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Responses

Typeable t => Steppable (OAuth2Flow t) t Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.OAuth2Flows

Associated Types

data Step (OAuth2Flow t) t Source #

Typeable a => Steppable (Referenced a) a Source # 
Instance details

Defined in Data.OpenApi.Compare.References

Associated Types

data Step (Referenced a) a Source #

Typeable param => Steppable (PathFragment param) Param Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.PathFragment

Associated Types

data Step (PathFragment param) Param Source #

Steppable (Referenced Schema) (Referenced Schema) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Schema.Traced

Associated Types

data Step (Referenced Schema) (Referenced Schema) Source #

(Typeable k, Typeable v, Ord k, Show k) => Steppable (InsOrdHashMap k v) v Source # 
Instance details

Defined in Data.OpenApi.Compare.Subtree

Associated Types

data Step (InsOrdHashMap k v) v Source #

data TraceRoot Source #

Instances

Instances details
Subtree PathFragmentParam Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.PathFragment

Steppable TraceRoot OpenApi Source # 
Instance details

Defined in Data.OpenApi.Compare.Subtree

Associated Types

data Step TraceRoot OpenApi Source #

Eq (Step TraceRoot OpenApi) Source # 
Instance details

Defined in Data.OpenApi.Compare.Subtree

Ord (Step TraceRoot OpenApi) Source # 
Instance details

Defined in Data.OpenApi.Compare.Subtree

Show (Step TraceRoot OpenApi) Source # 
Instance details

Defined in Data.OpenApi.Compare.Subtree

type CheckEnv PathFragmentParam Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.PathFragment

type SubtreeLevel PathFragmentParam Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.PathFragment

data Step TraceRoot OpenApi Source # 
Instance details

Defined in Data.OpenApi.Compare.Subtree

type Traced a = Traced' a a Source #

type Traced' a b = Env (Trace a) b Source #

pattern Traced :: Trace a -> b -> Traced' a b Source #

traced :: Trace a -> a -> Traced a Source #

retraced :: (Trace a -> Trace a') -> Traced' a b -> Traced' a' b Source #

stepTraced :: Steppable a a' => Step a a' -> Traced' a b -> Traced' a' b Source #

class (Typeable t, Issuable (SubtreeLevel t)) => Subtree (t :: Type) where Source #

Associated Types

type CheckEnv t :: [Type] Source #

type SubtreeLevel t :: BehaviorLevel Source #

Methods

checkStructuralCompatibility :: HList (CheckEnv t) -> ProdCons (Traced t) -> StructuralCompatFormula () Source #

Warning: You should not be calling this directly. Use checkSubstructure

checkSemanticCompatibility :: HList (CheckEnv t) -> Behavior (SubtreeLevel t) -> ProdCons (Traced t) -> SemanticCompatFormula () Source #

Warning: You should not be calling this directly. Use checkCompatibility

Instances

Instances details
Subtree OpenApi Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.OpenApi

Subtree RequestBody Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.RequestBody

Subtree MediaTypeObject Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.MediaTypeObject

Subtree Encoding Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.MediaTypeObject

Subtree Param Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Param

Associated Types

type CheckEnv Param :: [Type] Source #

type SubtreeLevel Param :: BehaviorLevel Source #

Subtree Link Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Link

Associated Types

type CheckEnv Link :: [Type] Source #

type SubtreeLevel Link :: BehaviorLevel Source #

Subtree Schema Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Schema

Associated Types

type CheckEnv Schema :: [Type] Source #

type SubtreeLevel Schema :: BehaviorLevel Source #

Subtree Responses Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Responses

Subtree Response Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Responses

Subtree Callback Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Operation

Subtree Header Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Header

Associated Types

type CheckEnv Header :: [Type] Source #

type SubtreeLevel Header :: BehaviorLevel Source #

Subtree OAuth2ImplicitFlow Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.OAuth2Flows

Subtree OAuth2PasswordFlow Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.OAuth2Flows

Subtree OAuth2ClientCredentialsFlow Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.OAuth2Flows

Subtree OAuth2AuthorizationCodeFlow Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.OAuth2Flows

Subtree OAuth2Flows Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.OAuth2Flows

Subtree SecurityScheme Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.SecurityScheme

Subtree SecurityRequirement Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.SecurityRequirement

Subtree PathFragmentParam Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.PathFragment

Subtree ProcessedPathItems Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Operation

Subtree MatchedOperation Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Operation

Subtree [Server] Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.Server

Associated Types

type CheckEnv [Server] :: [Type] Source #

type SubtreeLevel [Server] :: BehaviorLevel Source #

(Typeable t, Subtree t, SubtreeLevel (OAuth2Flow t) ~ SubtreeLevel t) => Subtree (OAuth2Flow t) Source # 
Instance details

Defined in Data.OpenApi.Compare.Validate.OAuth2Flows

Associated Types

type CheckEnv (OAuth2Flow t) :: [Type] Source #

type SubtreeLevel (OAuth2Flow t) :: BehaviorLevel Source #

Subtree a => Subtree (Referenced a) Source # 
Instance details

Defined in Data.OpenApi.Compare.References

Associated Types

type CheckEnv (Referenced a) :: [Type] Source #

type SubtreeLevel (Referenced a) :: BehaviorLevel Source #

checkCompatibility :: forall t xs. (ReassembleHList xs (CheckEnv t), Subtree t) => Behavior (SubtreeLevel t) -> HList xs -> ProdCons (Traced t) -> SemanticCompatFormula () Source #

checkSubstructure :: (ReassembleHList xs (CheckEnv t), Subtree t) => HList xs -> ProdCons (Traced t) -> StructuralCompatFormula () Source #

newtype CompatM a Source #

Constructors

CompatM 

Instances

Instances details
Monad CompatM Source # 
Instance details

Defined in Data.OpenApi.Compare.Subtree

Methods

(>>=) :: CompatM a -> (a -> CompatM b) -> CompatM b #

(>>) :: CompatM a -> CompatM b -> CompatM b #

return :: a -> CompatM a #

Functor CompatM Source # 
Instance details

Defined in Data.OpenApi.Compare.Subtree

Methods

fmap :: (a -> b) -> CompatM a -> CompatM b #

(<$) :: a -> CompatM b -> CompatM a #

Applicative CompatM Source # 
Instance details

Defined in Data.OpenApi.Compare.Subtree

Methods

pure :: a -> CompatM a #

(<*>) :: CompatM (a -> b) -> CompatM a -> CompatM b #

liftA2 :: (a -> b -> c) -> CompatM a -> CompatM b -> CompatM c #

(*>) :: CompatM a -> CompatM b -> CompatM b #

(<*) :: CompatM a -> CompatM b -> CompatM a #

MonadState (MemoState VarRef) CompatM Source # 
Instance details

Defined in Data.OpenApi.Compare.Subtree

data ProdCons a Source #

Constructors

ProdCons 

Fields

Instances

Instances details
Functor ProdCons Source # 
Instance details

Defined in Data.OpenApi.Compare.Subtree

Methods

fmap :: (a -> b) -> ProdCons a -> ProdCons b #

(<$) :: a -> ProdCons b -> ProdCons a #

Applicative ProdCons Source # 
Instance details

Defined in Data.OpenApi.Compare.Subtree

Methods

pure :: a -> ProdCons a #

(<*>) :: ProdCons (a -> b) -> ProdCons a -> ProdCons b #

liftA2 :: (a -> b -> c) -> ProdCons a -> ProdCons b -> ProdCons c #

(*>) :: ProdCons a -> ProdCons b -> ProdCons b #

(<*) :: ProdCons a -> ProdCons b -> ProdCons a #

Foldable ProdCons Source # 
Instance details

Defined in Data.OpenApi.Compare.Subtree

Methods

fold :: Monoid m => ProdCons m -> m #

foldMap :: Monoid m => (a -> m) -> ProdCons a -> m #

foldMap' :: Monoid m => (a -> m) -> ProdCons a -> m #

foldr :: (a -> b -> b) -> b -> ProdCons a -> b #

foldr' :: (a -> b -> b) -> b -> ProdCons a -> b #

foldl :: (b -> a -> b) -> b -> ProdCons a -> b #

foldl' :: (b -> a -> b) -> b -> ProdCons a -> b #

foldr1 :: (a -> a -> a) -> ProdCons a -> a #

foldl1 :: (a -> a -> a) -> ProdCons a -> a #

toList :: ProdCons a -> [a] #

null :: ProdCons a -> Bool #

length :: ProdCons a -> Int #

elem :: Eq a => a -> ProdCons a -> Bool #

maximum :: Ord a => ProdCons a -> a #

minimum :: Ord a => ProdCons a -> a #

sum :: Num a => ProdCons a -> a #

product :: Num a => ProdCons a -> a #

Traversable ProdCons Source # 
Instance details

Defined in Data.OpenApi.Compare.Subtree

Methods

traverse :: Applicative f => (a -> f b) -> ProdCons a -> f (ProdCons b) #

sequenceA :: Applicative f => ProdCons (f a) -> f (ProdCons a) #

mapM :: Monad m => (a -> m b) -> ProdCons a -> m (ProdCons b) #

sequence :: Monad m => ProdCons (m a) -> m (ProdCons a) #

Eq a => Eq (ProdCons a) Source # 
Instance details

Defined in Data.OpenApi.Compare.Subtree

Methods

(==) :: ProdCons a -> ProdCons a -> Bool #

(/=) :: ProdCons a -> ProdCons a -> Bool #

Ord a => Ord (ProdCons a) Source # 
Instance details

Defined in Data.OpenApi.Compare.Subtree

Methods

compare :: ProdCons a -> ProdCons a -> Ordering #

(<) :: ProdCons a -> ProdCons a -> Bool #

(<=) :: ProdCons a -> ProdCons a -> Bool #

(>) :: ProdCons a -> ProdCons a -> Bool #

(>=) :: ProdCons a -> ProdCons a -> Bool #

max :: ProdCons a -> ProdCons a -> ProdCons a #

min :: ProdCons a -> ProdCons a -> ProdCons a #

Show a => Show (ProdCons a) Source # 
Instance details

Defined in Data.OpenApi.Compare.Subtree

Methods

showsPrec :: Int -> ProdCons a -> ShowS #

show :: ProdCons a -> String #

showList :: [ProdCons a] -> ShowS #

swapProdCons :: SwapEnvRoles xs => (HList xs -> ProdCons x -> CompatFormula' q AnIssue r a) -> HList xs -> ProdCons x -> CompatFormula' q AnIssue r a Source #

embedFormula :: Paths q r l -> CompatFormula' q f l a -> CompatFormula' q f r a Source #

clarifyIssue :: AnItem q AnIssue r -> CompatFormula' q AnIssue r a -> CompatFormula' q AnIssue r a Source #

If the given formula contains any issues, add another issue on top. Otherwise succeed.

structuralIssue :: StructuralCompatFormula a Source #

Structural helpers

structuralMaybe :: (Subtree a, ReassembleHList xs (CheckEnv a)) => HList xs -> ProdCons (Maybe (Traced a)) -> StructuralCompatFormula () Source #

structuralMaybeWith :: (ProdCons a -> StructuralCompatFormula ()) -> ProdCons (Maybe a) -> StructuralCompatFormula () Source #

structuralEq :: (Eq a, Comonad w) => ProdCons (w a) -> StructuralCompatFormula () Source #

iohmStructural :: (ReassembleHList (k ': xs) (CheckEnv v), Ord k, Subtree v, Hashable k, Typeable k, Show k) => HList xs -> ProdCons (Traced (InsOrdHashMap k v)) -> StructuralCompatFormula () Source #

iohmStructuralWith :: (Ord k, Hashable k, Typeable k, Typeable v, Show k) => (k -> ProdCons (Traced v) -> StructuralCompatFormula ()) -> ProdCons (Traced (InsOrdHashMap k v)) -> StructuralCompatFormula () Source #

structuralList :: (Subtree a, ReassembleHList xs (CheckEnv a)) => HList xs -> ProdCons [Traced a] -> StructuralCompatFormula () Source #

Reexports

(>>>) :: forall k cat (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c infixr 1 #

Left-to-right composition

(<<<) :: forall k cat (b :: k) (c :: k) (a :: k). Category cat => cat b c -> cat a b -> cat a c infixr 1 #

Right-to-left composition

extract :: Comonad w => w a -> a #

extract . fmap f = f . extract

ask :: ComonadEnv e w => w a -> e #

local :: forall e e' (w :: Type -> Type) a. (e -> e') -> EnvT e w a -> EnvT e' w a #

Modifies the environment using the specified function.

step :: NiceQuiver q a b => q a b -> Paths q a b Source #

class Typeable (a :: k) #

The class Typeable allows a concrete representation of a type to be calculated.

Minimal complete definition

typeRep#