Documentation
¶
Overview ¶
Package docspage renders the API reference page for an OpenAPI spec. Zinc uses it for the docs page every app serves, and middleware/apidocs for the page it serves, so the two can't drift apart.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Asset ¶
type Asset struct {
// Name is the file name the page loads below Config.AssetsURL.
Name string
// URL is the pinned CDN URL the file comes from by default.
URL string
// Integrity is the file's Subresource Integrity hash.
Integrity string
// Stylesheet is true for CSS, false for JavaScript.
Stylesheet bool
}
Asset is one file a renderer loads.
type UI ¶
type UI string
UI is a docs renderer.
const ( Scalar UI = "scalar" // @scalar/api-reference 1.72.1, the default SwaggerUI UI = "swagger-ui" // swagger-ui-dist 5.33.0 Stoplight UI = "stoplight" // @stoplight/elements 9.0.25 Redoc UI = "redoc" // redoc 2.5.4 )
The renderers. Each loads a pinned version from cdn.jsdelivr.net, with a Subresource Integrity hash.
Click to show internal directories.
Click to hide internal directories.