h$94E      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None #$-./89>?0":  servant-docsCustomise how an 8! is converted into documentation. servant-docs~ ["foo"] "GET" /foo:defEndpoint & path <>~ ["foo"] & method .~ HTTP.methodPost "POST" /foo@ servant-docsRender a path as a -delimited stringA servant-docsAn <) whose path is `"/"` and whose method is GETHere's how you can modify it: defEndpoint"GET" /defEndpoint & path <>~ ["foo"] "GET" /foo:defEndpoint & path <>~ ["foo"] & method .~ HTTP.methodPost "POST" /fooB servant-docs An empty 8C servant-docsDefault documentation options.D servant-docsCombine two Responses, we can't make a monoid because merging Status breaks the laws.As such, we invent a non-commutative, left associative operation D; to mush two together taking the status from the very left.E servant-docs4Default response: status code 200, no response body. Can be tweaked with four lenses. defResponseResponse {_respStatus = 200, _respTypes = [], _respBody = [], _respHeaders = []}defResponse & respStatus .~ 204Response {_respStatus = 204, _respTypes = [], _respBody = [], _respHeaders = []}F servant-docsCombine two Actions, we can't make a monoid as merging Response breaks the laws.As such, we invent a non-commutative, left associative operation F= to mush two together taking the response from the very left.G servant-docsDefault  . Has no  , no query , expects no request body () and the typical response is E.Tweakable with lenses. defActionAction {_authInfo = [], _captures = [], _headers = [], _params = [], _notes = [], _mxParams = [], _rqtypes = [], _rqbody = [], _response = Response {_respStatus = 200, _respTypes = [], _respBody = [], _respHeaders = []}}&defAction & response.respStatus .~ 201Action {_authInfo = [], _captures = [], _headers = [], _params = [], _notes = [], _mxParams = [], _rqtypes = [], _rqbody = [], _response = Response {_respStatus = 201, _respTypes = [], _respBody = [], _respHeaders = []}}H servant-docs8Create an API that's comprised of a single endpoint. 8 is a (, so combine multiple endpoints with  or .I  servant-docsDefault API generation options.%All content types are shown for both  and ;  is set to  (i.e. un-grouped). servant-docsThe class that helps us get documentation for authenticated endpoints servant-docsThe class that helps us automatically get documentation for URL captures.Example of an instance: instance ToCapture (Capture "name" Text) where toCapture _ = DocCapture "name" "name of the person to greet" servant-docsThe class that helps us automatically get documentation for GET (or other  ) parameters.Example of an instance: instance ToParam (QueryParam' mods "capital" Bool) where toParam _ = DocQueryParam "capital" ["true", "false"] "Get the greeting message in uppercase (true) or not (false). Default is false." servant-docs for Generics.Note: we use combinators from Universe.Data.Helpers' for more productive sample generation. servant-docsThe class that lets us display a sample input or output in the supported content-types when generating documentation for endpoints that either:expect a request body, or return a non empty response bodyExample of an instance: {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} import Data.Aeson import Data.Text import GHC.Generics data Greet = Greet { _msg :: Text } deriving (Generic, Show) instance FromJSON Greet instance ToJSON Greet instance ToSample Greet where toSamples _ = singleSample g where g = Greet "Hello, haskeller!"*You can also instantiate this class using  instead of : it lets you specify different responses along with some context (as ) that explains when you're supposed to get the corresponding response. servant-docsThe class that abstracts away the impact of API combinators on documentation generation. servant-docs2Generate the docs for a given API that implements 3. This is the default way to create documentation. )docs == docsWithOptions defaultDocOptions servant-docs2Generate the docs for a given API that implements . servant-docs Create an  6 that is guaranteed to be within the given API layout.The safety here is to ensure that you only add custom documentation to an endpoint that actually exists within your API. extra :: ExtraInfo TestApi extra = extraInfo (Proxy :: Proxy ("greet" :> Capture "greetid" Text :> Delete)) $ defAction & headers <>~ ["unicorns"] & notes <>~ [ DocNote "Title" ["This is some text"] , DocNote "Second section" ["And some more"] ] servant-docsGenerate documentation given some extra introductions (in the form of DocInfo9) and some extra endpoint documentation (in the form of  .The extra introductions will be prepended to the top of the documentation, before the specific endpoint documentation. The extra endpoint documentation will be "unioned" with the automatically generated endpoint documentation.You are expected to build up the ExtraInfo with the Monoid instance and .-If you only want to add an introduction, use . servant-docs2Generate the docs for a given API that implements ) with with any number of introduction(s) servant-docs2Sample input or output (if there is at least one). servant-docs No samples. servant-docs"Single sample without description. servant-docsSamples without documentation. servant-docs,Default sample Generic-based inputs/outputs. servant-docsSynthesise a sample value of a type, encoded in the specified media types. servant-docsSynthesise a list of sample values of a particular type, encoded in the specified media types. servant-docs;Generate documentation in Markdown format for the given 8.This is equivalent to  I.  servant-docs;Generate documentation in Markdown format for the given 8 using the specified options.5These options allow you to customise aspects such as:Choose how many content-types for each request body example are shown with .Choose how many content-types for each response body example are shown with .For example, to only show the first content-type of each example:  markdownWith (I &    &    ) myAPI  servant-docs"TODO: this instance is incomplete. servant-docs=TODO: mention the endpoint is streaming, its framing strategyAlso there are no samples.$TODO: AcceptFraming for content-type servant-docsThe generated docs for  are empty. servant-docsThe generated docs for a  b just appends the docs for a with the docs for b. servant-docs "books" :>  "isbn" Text will appear as books:isbn in the docs. servant-docs "books" :>  "isbn" Text will appear as books:isbn in the docs.   !"#%$&')(*+-,./3210457689;:<=?>@ABCDEFGHIuvwxyz{|}~<=?>@A89;:B4576./3210*+-,&')("#%$ !CDE  FGHIvuwyx{z}|~None  ./>2 servant-docsReplace all JSON content types with PrettyJSON. Kind-polymorphic so it can operate on kinds * and [*]. servant-docsPrettyJSON content type. servant-docs&Prettify generated JSON documentation. docs ( ( ::  MyAPI)) None3 !"#$%&'()*+,-./012345678?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~*servant-docs-0.11.7-GEt1qIajvzvLYZ0zlhoTaDServant.Docs.InternalServant.Docs.Internal.Pretty Servant.DocsRenderingOptions_requestExamples_responseExamples _notesHeadingShowContentTypesAllContentTypesFirstContentTypeAction _authInfo _captures_headers_params_notes _mxParams_rqtypes_rqbody _responseResponse _respStatus _respTypes _respBody _respHeaders ParamKindNormalListFlag DocOptions _maxSamples ExtraInfoDocNote _noteTitle _noteBodyDocAuthentication _authIntro_authDataRequiredDocIntro _introTitle _introBody DocQueryParam _paramName _paramValues _paramDesc _paramKind DocCapture _capSymbol_capDescAPI _apiIntros _apiEndpointsEndpoint_path_methodshowPath defEndpointemptyAPIdefaultDocOptionscombineResponse defResponse combineAction defActionsingledefRenderingOptions$fHashableEndpoint$fShowEndpoint $fOrdDocIntro$fMonoidExtraInfo$fSemigroupExtraInfo $fMonoidAPI$fSemigroupAPI$fShowRenderingOptions$fEqShowContentTypes$fOrdShowContentTypes$fShowShowContentTypes$fReadShowContentTypes$fBoundedShowContentTypes$fEnumShowContentTypes$fEqAPI $fShowAPI $fEqAction $fOrdAction $fShowAction $fEqResponse $fOrdResponse$fShowResponse$fEqDocQueryParam$fOrdDocQueryParam$fShowDocQueryParam $fEqParamKind$fOrdParamKind$fShowParamKind$fShowDocOptions $fEqDocNote $fOrdDocNote $fShowDocNote$fEqDocAuthentication$fOrdDocAuthentication$fShowDocAuthentication $fEqDocIntro$fShowDocIntro$fEqDocCapture$fOrdDocCapture$fShowDocCapture $fEqEndpoint $fOrdEndpoint$fGenericEndpointauthDataRequired authIntro maxSamples apiEndpoints apiIntrosmethodpathcapDesc capSymbol paramDesc paramKind paramName paramValues introBody introTitlenoteBody noteTitlerespBody respHeaders respStatus respTypesauthInfocapturesheadersmxParamsnotesparamsresponserqbodyrqtypes ToAuthInfo toAuthInfo ToCapture toCaptureToParamtoParamAllHeaderSamplesallHeaderToSample GToSample gtoSamplesToSample toSamplesHasDocsdocsFor notesHeadingrequestExamplesresponseExamplesdocsdocsWithOptions extraInfodocsWithdocsWithIntrostoSample noSamples singleSamplesamplesdefaultSamplessampleByteStringsampleByteStringsmarkdown markdownWith$fHasDocsTYPEWithNamedContext$fHasDocsTYPE:>$fHasDocsTYPE:>0$fHasDocsTYPE:>1$fHasDocsTYPE:>2$fHasDocsTYPE:>3$fHasDocsTYPE:>4$fHasDocsTYPE:>5$fHasDocsTYPE:>6$fHasDocsTYPERaw$fHasDocsTYPE:>7$fHasDocsTYPEStream$fHasDocsTYPENoContentVerb$fHasDocsTYPEEmptyAPI$fHasDocsTYPE:<|>$fGToSamplekM1$fGToSamplek:+:$fGToSamplek:*:$fGToSamplekV1$fGToSamplekU1$fToSampleDual$fToSampleLast$fToSampleFirst$fToSampleProduct $fToSampleSum $fToSampleAny $fToSampleAll$fToSampleZipList$fToSampleConst$fToSampleNonEmpty $fToSample[]$fToSampleEither$fToSampleMaybe$fToSample(,,,,,,)$fToSample(,,,,,)$fToSample(,,,,)$fToSample(,,,)$fToSample(,,) $fToSample(,)$fToSampleOrdering$fToSampleBool$fToSampleNoContent$fHasDocsTYPE:>8$fHasDocsTYPEVerb$fGToSamplekK1$fHasDocsTYPEVerb0$fAllHeaderSamples[]:$fAllHeaderSamples[][]$fHasDocsTYPE:>9$fHasDocsTYPE:>10$fHasDocsTYPE:>11$fHasDocsTYPE:>12$fHasDocsTYPE:>13$fHasDocsTYPE:>14Pretty PrettyJSONpretty$fMimeRenderTYPEPrettyJSONa$fAcceptTYPEPrettyJSON(http-types-0.12.3-LMMV4F9OuE2BJ0myUSAImxNetwork.HTTP.Types.MethodMethodghc-prim GHC.TypesIntbytestring-0.10.10.0Data.ByteString.Lazy.Internal ByteStringbaseGHC.Real/GHC.BaseMonoidmappend<> GHC.MaybeNothing text-1.2.3.2Data.Text.InternalText"lens-4.19.2-2vEmLnNyc2RGyOpS48h1FFControl.Lens.Setter.~%servant-0.18.1-8AzI7G0HY4mJiHzrohUrBFServant.API.EmptyEmptyAPIServant.API.Alternative:<|>Servant.API.Capture CaptureAllCapture Data.ProxyProxy