Popularity
1.9
Declining
Activity
0.0
Stable
1
3
0
Monthly Downloads: 17
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags:
Web
gendocs alternatives and similar packages
Based on the "Web" category.
Alternatively, view gendocs alternatives based on common mentions on social networks and blogs.
-
swagger-petstore
swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition. -
haskell-bitmex-rest
swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition. -
servant
Main repository for the servant libraries — DSL for describing, serving, querying, mocking, documenting web applications and more! -
neuron
Future-proof note-taking and publishing based on Zettelkasten (superseded by Emanote: https://github.com/srid/emanote) -
tagsoup
Haskell library for parsing and extracting information from (possibly malformed) HTML/XML documents -
keera-hails-reactive-htmldom
Keera Hails: Haskell on Rails - Reactive Programming Framework for Interactive Haskell applications -
ghcjs-dom
Make Document Object Model (DOM) apps that run in any browser and natively using WebKitGtk
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Promo
www.influxdata.com
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of gendocs or a related project?
README
Generate interface documentation for your types
Example
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Example where
import Data.Aeson (ToJSON)
import Data.Proxy (Proxy(..))
import Data.Docs (markdown, Docs(..), Sample(..), genDocs, genDocsEnum)
import Data.Text (Text)
import qualified Data.Text as Text
import GHC.Generics (Generic)
data Person = Person
{ name :: Text
, age :: Age
, hobbies :: [Hobby]
} deriving (Show, Eq, Generic)
instance ToJSON Person
instance Docs Person
instance Sample Person where
sample _ = Person
{ name = "Bob"
, age = sample (Proxy :: Proxy Age)
, hobbies = [Haskell, Friends]
}
newtype Age = Age Int
deriving (Show, Eq, Generic)
instance ToJSON Age
instance Docs Age where
docs = genDocs "Age in years"
instance Sample Age where
sample _ = Age 31
samples _ = [Age 31, Age 24]
data Hobby = Haskell | Friends | Movies
deriving (Show, Eq, Generic, Enum, Bounded)
instance ToJSON Hobby
instance Docs Hobby where
docs = genDocsEnum "Hobby"
instance Sample Hobby where
sample _ = Haskell
doc :: IO ()
doc = do
putStrLn $ Text.unpack json
json :: Text
json = Text.intercalate "\n\n\n" $
[ markdown (Proxy :: Proxy Person)
, markdown (Proxy :: Proxy Age)
, markdown (Proxy :: Proxy Hobby)
]
This generates the following output
Person
---------------------
| Field | Type |
|---------|-------------------|
| name | [Text](#text) |
| age | [Age](#age) |
| hobbies | [[Hobby]](#hobby) |
```
{
"age": 31,
"hobbies": [
"Haskell",
"Friends"
],
"name": "Bob"
}
```
Age
---------------------
Age in years
```
31
```
Hobby
---------------------
| Values |
|-----------|
| "Haskell" |
| "Friends" |
| "Movies" |
```
"Haskell"
```