úÎ!ÂQ´«ê      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹Œ‘’“”•–—˜™š›œŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéNone"#,-.78=>?@ACHPUVX¨l9  servant-docsCustomise how an 8! is converted into documentation. servant-docs<How many content types to display for request body examples? servant-docs=How many content types to display for response body examples? servant-docsOptionally group all ! together under a common heading.  servant-docs8How many content-types for each example should be shown? servant-docs)For each example, show each content type. servant-docs-For each example, show only one content type. servant-docsWA datatype that represents everything that can happen at an endpoint, with its lenses:List of captures (Š)List of GET (or other ê) parameters ()=What the request body should look like, if any is requested ()5What the response should be if everything goes well ()You can tweak an  (like the default FK) with these lenses to transform an action and add some information to it. servant-docs-A type to represent an HTTP response. Has an ë status, a list of possible  MediaTypes, and a list of example ì response bodies. Tweak D using the ‡, ˆ and … lenses if you want.[If you want to respond with a non-empty response body, you'll most likely want to write a œO instance for the type that'll be represented as encoded data in the response. Can be tweaked with four lenses. defResponsePResponse {_respStatus = 200, _respTypes = [], _respBody = [], _respHeaders = []}ydefResponse & respStatus .~ 204 & respBody .~ [("If everything goes well", "application/json", "{ \"status\": \"ok\" }")]•Response {_respStatus = 204, _respTypes = [], _respBody = [("If everything goes well",application/json,"{ \"status\": \"ok\" }")], _respHeaders = []} servant-docsType of GET (or other ê ) parameter:Normal corresponds to  QueryParam, i.e your usual GET parameterList corresponds to  QueryParams), i.e GET parameters with multiple valuesFlag corresponds to  QueryFlag , i.e a value-less GET parameter servant-docsDocumentation options. servant-docsMaximum samples allowed.  servant-docsTType of extra information that a user may wish to "union" with their documentation.mThese are intended to be built using extraInfo. Multiple ExtraInfo may be combined with the monoid instance." servant-docs;A type to represent extra notes that may be attached to an .|This is intended to be used when writing your own HasDocs instances to add extra sections to your endpoint's documentation.& servant-docsAA type to represent Authentication information about an endpoint.* servant-docsIAn introductory paragraph for your documentation. You can pass these to §., servant-docsAppears above the intro blob- servant-docsEach String is a paragraph.. servant-docsA type to represent a GET (or other possible êÄ) parameter from the Query String. Holds its name, the possible values (leave empty if there isn't a finite number of them), and a description of how it influences the output or behavior.Write a –& instance for your GET parameter types4 servant-docsQA type to represent captures. Holds the name of the capture and a description.Write a ”" instance for your captured types.8 servant-docs\Our API documentation type, a product of top-level information and a good old hashmap from < to < servant-docsAn < type that holds the z and the y.Gets used as the key in the 8 hashmap. Modify A or any < value you want using the z and y lenses to tweak. defEndpoint"GET" /defEndpoint & path <>~ ["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-docs4Default response: status code 200, no response body. Can be tweaked with four lenses. defResponsePResponse {_respStatus = 200, _respTypes = [], _respBody = [], _respHeaders = []}defResponse & respStatus .~ 204PResponse {_respStatus = 204, _respTypes = [], _respBody = [], _respHeaders = []}E servant-docsQCombine two Actions, we can't make a monoid as merging Response breaks the laws.BAs such, we invent a non-commutative, left associative operation EV to mush two together taking the response, body and content types from the very left.F servant-docsDefault  . Has no Š , no query , expects no request body () and the typical response is D.Tweakable with lenses. defActionÜAction {_authInfo = [], _captures = [], _headers = [], _params = [], _notes = [], _mxParams = [], _rqtypes = [], _rqbody = [], _response = Response {_respStatus = 200, _respTypes = [], _respBody = [], _respHeaders = []}}&defAction & response.respStatus .~ 201ÜAction {_authInfo = [], _captures = [], _headers = [], _params = [], _notes = [], _mxParams = [], _rqtypes = [], _rqbody = [], _response = Response {_respStatus = 201, _respTypes = [], _respBody = [], _respHeaders = []}}G servant-docs8Create an API that's comprised of a single endpoint. 8 is a î(, so combine multiple endpoints with ï or ğ.H  servant-docsDefault API generation options.%All content types are shown for both ¡ and ¢;   is set to ñ (i.e. un-grouped).’ servant-docsEThe class that helps us get documentation for authenticated endpoints” servant-docsLThe class that helps us automatically get documentation for URL captures.Example of an instance: ninstance ToCapture (Capture "name" Text) where toCapture _ = DocCapture "name" "name of the person to greet"– servant-docsMThe 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. The use of Omega. allows 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: ÿO{-# 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 ¨G: it lets you specify different responses along with some context (as òH) that explains when you're supposed to get the corresponding response. servant-docs[The 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.yThe safety here is to ensure that you only add custom documentation to an endpoint that actually exists within your API. ÿhextra :: ExtraInfo TestApi extra = extraInfo (Proxy :: Proxy ("greet" :> Capture "greetid" Text :> Delete)) $ defAction & headers <>~ ["unicorns"] & notes <>~ [ DocNote "Title" ["This is some text"] , DocNote "Second secton" ["And some more"] ]¦ servant-docsGGenerate 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.IYou 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-docsJSynthesise a sample value of a type, encoded in the specified media types.® servant-docs_Synthesise 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 ° H.°  servant-docs;Generate documentation in Markdown format for the given 8 using the specified options.5These options allow you to customise aspects such as:PChoose how many content-types for each request body example are shown with ¡.QChoose how many content-types for each response body example are shown with ¢.AFor example, to only show the first content-type of each example:  markdownWith (H & ¡ ó  & ¢ ó  ) 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;:<=?>@ABCDEFGHtuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹Œ‘’“”•–—˜™š›œŸ ¡¢£¤¥¦§¨©ª«¬­®¯°†<=?>@A89;:B4576./3210*+-,&')("#%$ !CD  EFGHutvxwzy|{€~}‚„ƒˆ‡†…‘Œ‹Š‰¢¡ £¤¥¦§Ÿœ¨©ª«¬š›˜™­®–—”•’“¯°None -.=?@AHUV°ùå servant-docs]Replace 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)) åæçæçåNone±Gl !"#$%&'()*+,-./012345678<ABCDFGHtuvwxyz{|}~€‚ƒ„…‡ˆ‰Š‹‘”•–—œŸ ¡¢£¤¥¦§¨©ª«­®¯°çlŸ£ç¯°H¡¢ ¦§¤ !¥Cvœ¨©ª«­®–—”•<zyA8xwB&'()ut4567|{./0123€}~"#$%„ƒ*+,-‚‡ˆ…D‰Š‹‘FGù        !!"#$$%&''()**+,-.//012234556789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹Œ‘’“”•–—˜™š›œŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéêëìíëîïëîğëîñëòóëôõö÷øùúûùüıùşÿùşë*servant-docs-0.11.3-9ClFbl7DD7W15hDTsXnnIOServant.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 defEndpointemptyAPIdefaultDocOptions defResponse combineAction defActionsingledefRenderingOptions$fHashableEndpoint$fShowEndpoint $fOrdDocIntro$fMonoidExtraInfo$fSemigroupExtraInfo $fMonoidAPI$fSemigroupAPI $fEqEndpoint $fOrdEndpoint$fGenericEndpoint$fEqDocCapture$fOrdDocCapture$fShowDocCapture $fEqDocIntro$fShowDocIntro$fEqDocAuthentication$fOrdDocAuthentication$fShowDocAuthentication $fEqDocNote $fOrdDocNote $fShowDocNote$fShowDocOptions $fEqParamKind$fOrdParamKind$fShowParamKind$fEqDocQueryParam$fOrdDocQueryParam$fShowDocQueryParam $fEqResponse $fOrdResponse$fShowResponse $fEqAction $fOrdAction $fShowAction$fEqAPI $fShowAPI$fEqShowContentTypes$fOrdShowContentTypes$fShowShowContentTypes$fReadShowContentTypes$fBoundedShowContentTypes$fEnumShowContentTypes$fShowRenderingOptionsauthDataRequired 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$fHasDocsTYPEEmptyAPI$fHasDocsTYPE:<|>$fGToSamplekM1$fGToSamplek:+:$fGToSamplek:*:$fGToSamplekV1$fGToSamplekU1$fToSampleDual$fToSampleLast$fToSampleFirst$fToSampleProduct $fToSampleSum $fToSampleAny $fToSampleAll$fToSampleZipList$fToSampleConst $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.2-3MHM9iMYLVB570tAcpCyghNetwork.HTTP.Types.MethodMethodghc-prim GHC.TypesIntbytestring-0.10.8.2Data.ByteString.Lazy.Internal ByteStringbaseGHC.Real/GHC.BaseMonoidmappend<> GHC.MaybeNothing GHC.TypeLits ErrorMessage lens-4.17-CT4JBnbANTY4Ofd5JvefG9Control.Lens.Setter.~#servant-0.15-2a7SBGEROHzDCNgJSw8q3sServant.API.EmptyEmptyAPIServant.API.Alternative:<|>Servant.API.Capture CaptureAllCapture Data.ProxyProxy