Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.OpenApi.Compare.Behavior
Synopsis
- data BehaviorLevel
- class (Ord (Behave a b), Show (Behave a b)) => Behavable (a :: BehaviorLevel) (b :: BehaviorLevel) where
- data Behave a b
- describeBehavior :: Behave a b -> Inlines
- data IssueKind
- class (Typeable l, Ord (Issue l), Show (Issue l)) => Issuable (l :: BehaviorLevel) where
- data Issue l :: Type
- describeIssue :: Orientation -> Issue l -> Blocks
- issueKind :: Issue l -> IssueKind
- relatedIssues :: Issue l -> Issue l -> Bool
- data Orientation
- toggleOrientation :: Orientation -> Orientation
- type Behavior = Paths Behave 'APILevel
- data AnIssue (l :: BehaviorLevel) where
- AnIssue :: Issuable l => Orientation -> Issue l -> AnIssue l
- withClass :: Eq b => (a -> a -> Bool) -> (a -> Maybe b) -> a -> a -> Bool
- anIssueKind :: AnIssue l -> IssueKind
- relatedAnIssues :: AnIssue l -> AnIssue l -> Bool
Documentation
data BehaviorLevel Source #
Kind
Constructors
Instances
type AdditionalQuiverConstraints Behave (a :: BehaviorLevel) (b :: BehaviorLevel) Source # | |
Defined in Data.OpenApi.Compare.Behavior |
class (Ord (Behave a b), Show (Behave a b)) => Behavable (a :: BehaviorLevel) (b :: BehaviorLevel) where Source #
Methods
describeBehavior :: Behave a b -> Inlines Source #
Instances
Constructors
CertainIssue | This is certainly an issue, we can demonstrate a "counterexample" |
ProbablyIssue | Change looks breaking but we don't have a complete comprehension of the problem |
Unsupported | We don't really support this feature at all, outside structural comparison |
Comment | This is not an issue in itself, but a clarifying comment providing context for some other issues |
SchemaInvalid | We detected an issue with one of the input schemata itself |
Instances
Eq IssueKind Source # | |
Ord IssueKind Source # | |
Show IssueKind Source # | |
class (Typeable l, Ord (Issue l), Show (Issue l)) => Issuable (l :: BehaviorLevel) where Source #
Minimal complete definition
Methods
describeIssue :: Orientation -> Issue l -> Blocks Source #
The same issues can be rendered in multiple places and might require different ways of represnting them to the user.
In practice each issue requires a maximum of two different representations:
based on the context the issue might need to be rendered as "opposite" (Backward
)
– for example when rendering non-breaking changes everything should be
reversed (a consequence of the way we generate non-breaking changes).
If _consumer_ doesn't have something, the element was "removed". If _producer_ doesn't have something, the element was "added".
issueKind :: Issue l -> IssueKind Source #
relatedIssues :: Issue l -> Issue l -> Bool Source #
An equivalence relation designating whether two issues are talking about the aspect of the schema. This is used to remove duplicates from the "reverse" error tree we get when we look for non-breaking changes. Generally if checking X->Y raises issue I, and checking Y->X raises issue J, I and J should be related.
Instances
data Orientation Source #
Instances
Eq Orientation Source # | |
Defined in Data.OpenApi.Compare.Behavior | |
Ord Orientation Source # | |
Defined in Data.OpenApi.Compare.Behavior Methods compare :: Orientation -> Orientation -> Ordering # (<) :: Orientation -> Orientation -> Bool # (<=) :: Orientation -> Orientation -> Bool # (>) :: Orientation -> Orientation -> Bool # (>=) :: Orientation -> Orientation -> Bool # max :: Orientation -> Orientation -> Orientation # min :: Orientation -> Orientation -> Orientation # | |
Show Orientation Source # | |
Defined in Data.OpenApi.Compare.Behavior Methods showsPrec :: Int -> Orientation -> ShowS # show :: Orientation -> String # showList :: [Orientation] -> ShowS # |
type Behavior = Paths Behave 'APILevel Source #
A set of interactions having common unifying features
data AnIssue (l :: BehaviorLevel) where Source #
Constructors
AnIssue :: Issuable l => Orientation -> Issue l -> AnIssue l |
Instances
Eq (AnIssue l) Source # | |
Ord (AnIssue l) Source # | |
Show (AnIssue l) Source # | |
ToJSON (AnIssue l) Source # | |
Defined in Data.OpenApi.Compare.Behavior |
anIssueKind :: AnIssue l -> IssueKind Source #