Skip to main content

Settings

The settings of a portal are metadata of its documentation, all optional:

{
"documentation": {
"metadata": {
"portal.title": "Wines",
"portal.accent": "#7c2d12",
"portal.links": "[{\"label\": \"Status\", \"url\": \"https://status.example.com\"}]",
"portal.terms": "/docs/terms",
"portal.keys.reason": "manual"
}
}
}

The look​

KeyDefaultDescription
portal.titlethe name of the APIThe name of the portal, in the top bar and the hero of the home
portal.descriptionthe description of the APIThe pitch of the home
portal.themesystemsystem, light or dark
portal.toggletruefalse hides the light / dark button (and locks a light or dark theme)
portal.accent#0061bdThe accent color, like #4f46e5
portal.linksnoneLinks of the top bar: a JSON array, as a string, of { "label", "url" }

The logo, footer and banner resources of the documentation complete it.

The API reference​

KeyDefaultDescription
portal.reference.themedefaultThe theme of Scalar: default, alternate, moon, purple, solarized, bluePlanet, deepSpace, saturn, kepler, mars, laserwave, elysiajs, fastify, none
portal.reference.layoutmodernmodern or classic
portal.reference.clienttruefalse hides the client (the Test Request buttons)
portal.reference.modelstruefalse hides the models
portal.reference.gateway_servertruefalse keeps only the servers of the specifications (see API reference)

The keys​

KeyDefaultDescription
portal.keys.per_userunlimitedHow many keys a developer can take
portal.keys.reasonoptionalAsking why a developer takes a key: optional, required, manual (required for the plans validated by hand) or none
portal.termsnoneThe terms of use: an address, or a path of the documentation like /docs/terms. A developer accepts them before taking a key
portal.sample_paththe first GET of the specificationThe request of the code samples of a key, like /pets?status=available

In a catalog​

KeyDescription
portal.slugThe slug of the API in a catalog: its portal is under /apis/<slug> (the name of the API by default)

The look of a catalog (theme, accent, links, logo) applies to the portals of its APIs; the other settings of each API still apply to its own pages.