{"id":28239456,"url":"https://github.com/codedownio/servant-typescript-docs","last_synced_at":"2025-06-11T07:31:26.970Z","repository":{"id":126467461,"uuid":"227720394","full_name":"codedownio/servant-typescript-docs","owner":"codedownio","description":"Modified version of servant-docs to integrate with aeson-typescript","archived":false,"fork":false,"pushed_at":"2025-05-14T09:25:52.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-19T02:12:29.507Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codedownio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-12-13T00:15:31.000Z","updated_at":"2025-05-14T09:25:56.000Z","dependencies_parsed_at":"2024-06-12T23:53:57.729Z","dependency_job_id":"e2a9aad1-7429-4c03-97bb-41c4561f1b7f","html_url":"https://github.com/codedownio/servant-typescript-docs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedownio%2Fservant-typescript-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedownio%2Fservant-typescript-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedownio%2Fservant-typescript-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedownio%2Fservant-typescript-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codedownio","download_url":"https://codeload.github.com/codedownio/servant-typescript-docs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedownio%2Fservant-typescript-docs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259221931,"owners_count":22823987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-19T02:12:29.343Z","updated_at":"2025-06-11T07:31:26.956Z","avatar_url":"https://github.com/codedownio.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# servant-docs\n\n![servant](https://raw.githubusercontent.com/haskell-servant/servant/master/servant.png)\n\nGenerate API docs for your *servant* webservice. Feel free to also take a look at [servant-pandoc](https://github.com/mpickering/servant-pandoc) which uses this package to target a broad range of output formats using the excellent **pandoc**.\n\n## Example\n\nSee [here](https://github.com/haskell-servant/servant/blob/master/servant-docs/example/greet.md) for the output of the following program.\n\n``` haskell\n{-# LANGUAGE DataKinds #-}\n{-# LANGUAGE PolyKinds #-}\n{-# LANGUAGE TypeFamilies #-}\n{-# LANGUAGE DeriveGeneric #-}\n{-# LANGUAGE TypeOperators #-}\n{-# LANGUAGE FlexibleInstances #-}\n{-# LANGUAGE OverloadedStrings #-}\n\nimport Data.Proxy\nimport Data.Text\nimport Servant.Docs\n\n-- our type for a Greeting message\ndata Greet = Greet { _msg :: Text }\n  deriving (Generic, Show)\n\n-- we get our JSON serialization for free. This will be used by the default\n-- 'MimeRender' instance for 'JSON'.\ninstance FromJSON Greet\ninstance ToJSON Greet\n\n-- We can also implement 'MimeRender' explicitly for additional formats.\ninstance MimeRender PlainText Greet where\n    mimeRender Proxy (Greet s) = \"\u003ch1\u003e\" \u003c\u003e cs s \u003c\u003e \"\u003c/h1\u003e\"\n\n-- we provide a sample value for the 'Greet' type\ninstance ToSample Greet where\n  toSample = Just g\n\n    where g = Greet \"Hello, haskeller!\"\n\ninstance ToParam (QueryParam \"capital\" Bool) where\n  toParam _ =\n    DocQueryParam \"capital\"\n                  [\"true\", \"false\"]\n                  \"Get the greeting message in uppercase (true) or not (false). Default is false.\"\n\ninstance ToCapture (Capture \"name\" Text) where\n  toCapture _ = DocCapture \"name\" \"name of the person to greet\"\n\ninstance ToCapture (Capture \"greetid\" Text) where\n  toCapture _ = DocCapture \"greetid\" \"identifier of the greet msg to remove\"\n\n-- API specification\ntype TestApi =\n       \"hello\" :\u003e Capture \"name\" Text :\u003e QueryParam \"capital\" Bool :\u003e Get '[JSON,PlainText] Greet\n  :\u003c|\u003e \"greet\" :\u003e RQBody '[JSON] Greet :\u003e Post '[JSON] Greet\n  :\u003c|\u003e \"delete\" :\u003e Capture \"greetid\" Text :\u003e Delete '[] ()\n\ntestApi :: Proxy TestApi\ntestApi = Proxy\n\n-- Generate the Documentation's ADT\ngreetDocs :: API\ngreetDocs = docs testApi\n\nmain :: IO ()\nmain = putStrLn $ markdown greetDocs\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodedownio%2Fservant-typescript-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodedownio%2Fservant-typescript-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodedownio%2Fservant-typescript-docs/lists"}