Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Documentation = Documentation {
- typeName :: TypeName
- fields :: [Field]
- description :: Text
- enumeratedValues :: [Text]
- data Field = Field {
- fieldName :: FieldName
- fieldType :: TypeName
- isRequired :: Bool
- class Docs a where
- genDocs :: forall a. (Generic a, GTypeName (Rep a), Selectors (Rep a)) => Text -> Proxy a -> Documentation
- genDocsWith :: forall a. (Generic a, GTypeName (Rep a), Selectors (Rep a)) => FieldModifier -> Text -> Proxy a -> Documentation
- type FieldModifier = String -> String
- genDocsEnum :: forall a. (Generic a, GTypeName (Rep a), Selectors (Rep a), Bounded a, Enum a, Show a) => Text -> Proxy a -> Documentation
- genValues :: forall a. (Enum a, Bounded a, Show a) => Proxy a -> [Text]
- genFields :: forall a. Selectors (Rep a) => FieldModifier -> Proxy a -> [Field]
- class Sample a where
- markdown :: (ToJSON a, Docs a, Sample a) => Proxy a -> Text
Documentation
data Documentation Source #
Documentation for a given type
Documentation | |
|
Documentation for a record field
Field | |
|
Can generate documentation for type
genDocs :: forall a. (Generic a, GTypeName (Rep a), Selectors (Rep a)) => Text -> Proxy a -> Documentation Source #
Create documentation for a type with only a description
genDocsWith :: forall a. (Generic a, GTypeName (Rep a), Selectors (Rep a)) => FieldModifier -> Text -> Proxy a -> Documentation Source #
type FieldModifier = String -> String Source #
genDocsEnum :: forall a. (Generic a, GTypeName (Rep a), Selectors (Rep a), Bounded a, Enum a, Show a) => Text -> Proxy a -> Documentation Source #