Documentation
¶
Index ¶
- type BuildWarning
- type CallbackInfo
- type CallbackOperationInfo
- type CatalogService
- type CatalogSite
- type CatalogSpecEntry
- type CatalogVersion
- type ComponentLink
- type ComponentRef
- type ContactInfo
- type CurlVariant
- type ExtensionEntry
- type ExternalDocInfo
- type HeaderInfo
- type LicenseInfo
- type LinkInfo
- type MediaTypeInfo
- type ModelCrossRefs
- type ModelPage
- type NavModel
- type NavModelGroup
- type NavOperation
- type NavTag
- type OperationCrossRefs
- type OperationPage
- type OperationRef
- type ParameterInfo
- type RequestBodyInfo
- type ResponseInfo
- type RootPage
- type SchemaRegistryEntry
- type SecurityRequirement
- type SecurityRequirementGroup
- type ServerInfo
- type ServerVariableInfo
- type Site
- type SiteHeaderContext
- type SiteVersionLink
- type SourceRef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildWarning ¶
BuildWarning records a non-fatal issue encountered during documentation generation.
type CallbackInfo ¶
type CallbackInfo struct {
Name string `json:"name"`
Ref *ComponentLink `json:"ref,omitempty"`
Operations []*CallbackOperationInfo `json:"operations"`
}
CallbackInfo holds a single named callback with its expression operations.
type CallbackOperationInfo ¶
type CallbackOperationInfo struct {
Expression string `json:"expression"`
Method string `json:"method"`
Description string `json:"description,omitempty"`
DescHTML string `json:"descHtml,omitempty"`
RequestBody *RequestBodyInfo `json:"requestBody,omitempty"`
Responses []*ResponseInfo `json:"responses,omitempty"`
}
CallbackOperationInfo holds one operation within a callback expression.
type CatalogService ¶ added in v0.0.55
type CatalogService struct {
Key string `json:"key"`
Slug string `json:"slug"`
DisplayName string `json:"displayName"`
Summary string `json:"summary,omitempty"`
PrimaryPath string `json:"primaryPath,omitempty"`
SpecCount int `json:"specCount"`
OverviewHref string `json:"overviewHref,omitempty"`
VersionsHref string `json:"versionsHref,omitempty"`
LatestVersion *CatalogVersion `json:"latestVersion,omitempty"`
Versions []*CatalogVersion `json:"versions,omitempty"`
CollisionGroups []string `json:"collisionGroups,omitempty"`
}
CatalogService represents one grouped service in the aggregate catalog.
type CatalogSite ¶ added in v0.0.55
type CatalogSite struct {
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
ScanRoot string `json:"scanRoot,omitempty"`
OutputDir string `json:"-"`
BaseURL string `json:"-"`
AssetMode string `json:"-"`
Services []*CatalogService `json:"services,omitempty"`
Warnings []*BuildWarning `json:"warnings,omitempty"`
}
CatalogSite is the aggregate multi-spec documentation catalog.
type CatalogSpecEntry ¶ added in v0.0.55
type CatalogSpecEntry struct {
ID string `json:"id"`
Slug string `json:"slug"`
Title string `json:"title,omitempty"`
Summary string `json:"summary,omitempty"`
ServiceKey string `json:"serviceKey,omitempty"`
ServiceSlug string `json:"serviceSlug,omitempty"`
Version string `json:"version,omitempty"`
VersionSlug string `json:"versionSlug,omitempty"`
Format string `json:"format,omitempty"`
RelativePath string `json:"relativePath,omitempty"`
OutputSubdir string `json:"outputSubdir,omitempty"`
OverviewHref string `json:"overviewHref,omitempty"`
RenderSkipped bool `json:"renderSkipped,omitempty"`
Warnings []string `json:"warnings,omitempty"`
Source *SourceRef `json:"source,omitempty"`
HeaderContext *SiteHeaderContext `json:"headerContext,omitempty"`
}
CatalogSpecEntry is one discovered root specification rendered within the catalog.
type CatalogVersion ¶ added in v0.0.55
type CatalogVersion struct {
Label string `json:"label"`
Slug string `json:"slug"`
Summary string `json:"summary,omitempty"`
OverviewHref string `json:"overviewHref,omitempty"`
SpecCount int `json:"specCount"`
IsLatest bool `json:"isLatest,omitempty"`
Entries []*CatalogSpecEntry `json:"entries,omitempty"`
}
CatalogVersion groups one or more spec entries under the same service version.
type ComponentLink ¶
type ComponentLink struct {
Name string `json:"name"` // original component name
ComponentType string `json:"componentType"` // ref segment e.g. "responses"
TypeSlug string `json:"typeSlug"` // URL segment e.g. "responses", "request-bodies"
Slug string `json:"slug"` // URL-safe slug for the model page
}
ComponentLink represents a resolved $ref to a component model page.
type ComponentRef ¶
type ComponentRef struct {
Name string `json:"name"`
ComponentType string `json:"componentType"`
TypeSlug string `json:"typeSlug"` // URL path segment: "request-bodies", "path-items", etc.
Slug string `json:"slug"`
}
ComponentRef is a lightweight reference to a component from a cross-ref.
type ContactInfo ¶
ContactInfo holds API contact metadata.
type CurlVariant ¶
type CurlVariant struct {
Label string `json:"label"`
ServerURL string `json:"serverUrl"`
ServerDescription string `json:"serverDescription,omitempty"`
SecurityLabel string `json:"securityLabel,omitempty"`
Command string `json:"command"`
}
CurlVariant holds a single generated cURL command plus selection metadata.
type ExtensionEntry ¶
ExtensionEntry holds a single x-* extension key-value pair, preserving spec order.
type ExternalDocInfo ¶
ExternalDocInfo holds external documentation reference.
type HeaderInfo ¶
type HeaderInfo struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
SchemaType string `json:"schemaType,omitempty"`
Ref *ComponentLink `json:"ref,omitempty"`
Example string `json:"example,omitempty"`
Minimum *float64 `json:"minimum,omitempty"`
Maximum *float64 `json:"maximum,omitempty"`
Default string `json:"default,omitempty"`
Enum []string `json:"enum,omitempty"`
Pattern string `json:"pattern,omitempty"`
Extensions []*ExtensionEntry `json:"extensions,omitempty"`
}
HeaderInfo holds a single response header entry.
type LicenseInfo ¶
LicenseInfo holds API license metadata.
type LinkInfo ¶
type LinkInfo struct {
Name string `json:"name"`
OperationId string `json:"operationId,omitempty"`
OperationSlug string `json:"operationSlug,omitempty"`
OperationRef string `json:"operationRef,omitempty"`
Description string `json:"description,omitempty"`
Ref *ComponentLink `json:"ref,omitempty"`
}
LinkInfo holds a single response link entry.
type MediaTypeInfo ¶
type MediaTypeInfo struct {
MediaType string `json:"mediaType"`
SchemaJSON string `json:"schemaJson"`
SchemaHighlightedHTML string `json:"-"` // chroma output, templ only
MockJSON string `json:"mockJson,omitempty"`
MockYAML string `json:"mockYaml,omitempty"`
MockXML string `json:"mockXml,omitempty"`
Examples map[string]string `json:"examples,omitempty"`
SchemaRef *ComponentLink `json:"schemaRef,omitempty"`
IsArray bool `json:"isArray,omitempty"`
ItemsRef *ComponentLink `json:"itemsRef,omitempty"`
ItemsSchemaJSON string `json:"itemsSchemaJson,omitempty"`
Extensions []*ExtensionEntry `json:"extensions,omitempty"`
}
MediaTypeInfo holds a single media type entry.
type ModelCrossRefs ¶
type ModelCrossRefs struct {
UsedByOperations []*OperationRef `json:"usedByOperations,omitempty"`
UsedByModels []*ComponentRef `json:"usedByModels,omitempty"`
UsesModels []*ComponentRef `json:"usesModels,omitempty"`
}
ModelCrossRefs holds cross-reference information for a model.
type ModelPage ¶
type ModelPage struct {
Name string
ComponentType string // "schemas", "responses", "parameters", etc.
TypeSlug string // URL path segment for the component type
Slug string
Description string
DescHTML string
SchemaJSON string // JSON representation for cowboy-components rendering
SchemaHighlightedHTML string `json:"-"` // chroma output, templ only
RawYAML string `json:"-"` // re-rendered YAML from Render(), for raw viewer
SchemaRawYAML string `json:"-"` // schema-only YAML for inline viewer (parameters, headers)
SchemaRawJSON string `json:"-"` // schema-only JSON for inline viewer (parameters, headers)
SchemaStartLine int `json:"-"` // 1-based source line where schema content begins (parameters, headers)
MockJSON string
Examples map[string]string
ExamplesJSON string // pre-serialized for Lit component
Origin *bundler.ComponentOrigin
Source *SourceRef `json:"source,omitempty"`
Extensions []*ExtensionEntry
ExtensionsJSON string `json:"-"`
CrossRefs *ModelCrossRefs
CrossRefsJSON string `json:"-"`
MermaidDiagram string `json:"-"` // mermaid class diagram DSL; empty if no relationships
GraphJSON string `json:"-"` // pre-filtered dependency subgraph for explorer
GraphNodeID string `json:"-"` // exact JSONPath node ID for POV focus
LayoutMode string `json:"-"` // simple, stacked, or split
EstimatedBodyHeight int `json:"-"`
EstimatedSplitHeight int `json:"-"`
EstimatedCrossRefsHeight int `json:"-"`
PropertyCount int `json:"-"`
RequiredCount int `json:"-"`
HasExamplePayload bool `json:"-"`
}
ModelPage is the full data for rendering a component detail page.
type NavModel ¶
type NavModel struct {
}
NavModel is a lightweight reference to a model for navigation.
type NavModelGroup ¶
type NavModelGroup struct {
}
NavModelGroup is a group of models of the same component type for navigation.
func (*NavModelGroup) CardGridStyle ¶
func (g *NavModelGroup) CardGridStyle() string
type NavOperation ¶
type NavOperation struct {
}
NavOperation is a lightweight reference to an operation for navigation.
type NavTag ¶
type NavTag struct {
}
NavTag represents a tag node in the hierarchical navigation tree.
func (*NavTag) DisplayName ¶
DisplayName returns Summary if set, otherwise Name.
type OperationCrossRefs ¶
type OperationCrossRefs struct {
ReferencesModels []*ComponentRef `json:"referencesModels,omitempty"` // components this operation uses
}
OperationCrossRefs holds cross-reference information for an operation.
type OperationPage ¶
type OperationPage struct {
Method string
Path string
OperationID string
Summary string
Description string
DescHTML string
Tags []string
TagPath []string // hierarchical tag path from root to leaf (summaries)
TagSlugs []string // parallel to TagPath: slug for each tag's index page
Deprecated bool
Slug string
Parameters []*ParameterInfo
ParametersJSON string `json:"-"` // pre-serialized for Lit component; excluded from JSON writer
RequestBody *RequestBodyInfo
Responses []*ResponseInfo
ResponsesJSON string `json:"-"` // pre-serialized for Lit component; excluded from JSON writer
CommonHeaders []*HeaderInfo
CommonHeadersJSON string `json:"-"` // pre-serialized for templ rendering
Security []*SecurityRequirement
SecurityGroups []*SecurityRequirementGroup `json:"securityGroups,omitempty"`
HasSecurityOverride bool `json:"-"`
Servers []*ServerInfo
ExternalDoc *ExternalDocInfo
CurlJSON string `json:"curlJson,omitempty"`
Extensions []*ExtensionEntry `json:"extensions,omitempty"`
ExtensionsJSON string `json:"-"` // pre-serialized for Lit component
PathExtensions []*ExtensionEntry `json:"pathExtensions,omitempty"`
PathExtensionsJSON string `json:"-"`
Callbacks []*CallbackInfo `json:"callbacks,omitempty"`
CallbacksJSON string `json:"-"` // pre-serialized for Lit component
SchemaJSON string // full operation rendered as JSON for cowboy-components
SchemaHighlightedHTML string `json:"-"` // chroma output, templ only
RawYAML string `json:"-"` // re-rendered YAML from Render(), for raw viewer
SourceLine int `json:"-"` // 1-based YAML line number of the operation
Location string `json:"-"` // source file path for multi-file specs
Source *SourceRef `json:"source,omitempty"`
CrossRefs *OperationCrossRefs
}
OperationPage is the full data for rendering an operation detail page.
type OperationRef ¶
type OperationRef struct {
Method string `json:"method"`
Path string `json:"path"`
Slug string `json:"slug"`
}
OperationRef is a lightweight reference to an operation from a cross-ref.
type ParameterInfo ¶
type ParameterInfo struct {
Name string `json:"name"`
In string `json:"in"`
Description string `json:"description"`
Required bool `json:"required"`
Deprecated bool `json:"deprecated"`
SchemaJSON string `json:"schemaJson"`
MockJSON string `json:"mockJson,omitempty"`
Examples map[string]string `json:"examples,omitempty"`
Ref *ComponentLink `json:"ref,omitempty"`
RawJSON string `json:"rawJson,omitempty"`
RawYAML string `json:"rawYaml,omitempty"`
SourceLine int `json:"sourceLine,omitempty"`
Location string `json:"location,omitempty"`
Source *SourceRef `json:"source,omitempty"`
Extensions []*ExtensionEntry `json:"extensions,omitempty"`
}
ParameterInfo holds operation parameter data.
type RequestBodyInfo ¶
type RequestBodyInfo struct {
Description string `json:"description,omitempty"`
DescHTML string `json:"descHtml,omitempty"`
Required bool `json:"required,omitempty"`
Content []*MediaTypeInfo `json:"content,omitempty"`
Ref *ComponentLink `json:"ref,omitempty"`
RawJSON string `json:"rawJson,omitempty"`
RawYAML string `json:"rawYaml,omitempty"`
SourceLine int `json:"sourceLine,omitempty"`
Location string `json:"location,omitempty"`
Source *SourceRef `json:"source,omitempty"`
Extensions []*ExtensionEntry `json:"extensions,omitempty"`
ExtensionsJSON string `json:"-"`
}
RequestBodyInfo holds request body data.
type ResponseInfo ¶
type ResponseInfo struct {
StatusCode string `json:"statusCode"`
Description string `json:"description"`
DescHTML string `json:"descHtml,omitempty"`
Content []*MediaTypeInfo `json:"content,omitempty"`
Headers []*HeaderInfo `json:"headers,omitempty"`
Links []*LinkInfo `json:"links,omitempty"`
Ref *ComponentLink `json:"ref,omitempty"`
RawJSON string `json:"rawJson,omitempty"`
RawYAML string `json:"rawYaml,omitempty"`
SourceLine int `json:"sourceLine,omitempty"`
Location string `json:"location,omitempty"`
Source *SourceRef `json:"source,omitempty"`
Extensions []*ExtensionEntry `json:"extensions,omitempty"`
}
ResponseInfo holds a single response entry.
type RootPage ¶
type RootPage struct {
Title string
Description string
DescHTML string
Version string
Contact *ContactInfo
License *LicenseInfo
Servers []*ServerInfo
Security []*SecurityRequirement
SecurityGroups []*SecurityRequirementGroup `json:"securityGroups,omitempty"`
ExternalDoc *ExternalDocInfo
TagTree []*NavTag
UntaggedOperations []*NavOperation
Webhooks []*NavOperation
Warnings []*BuildWarning
Source *SourceRef `json:"source,omitempty"`
}
RootPage is the landing page data for the generated documentation.
type SchemaRegistryEntry ¶
type SchemaRegistryEntry struct {
Name string `json:"name"`
ComponentType string `json:"componentType"`
Description string `json:"description,omitempty"`
SchemaJSON string `json:"schemaJson"`
MockJSON string `json:"mockJson,omitempty"`
}
SchemaRegistryEntry holds the data needed for hover popovers on $ref links.
type SecurityRequirement ¶
type SecurityRequirement struct {
Name string `json:"name"`
Scopes []string `json:"scopes,omitempty"`
SchemeType string `json:"schemeType,omitempty"` // apiKey, http, oauth2, openIdConnect
In string `json:"in,omitempty"` // query, header, cookie (for apiKey)
Scheme string `json:"scheme,omitempty"` // bearer, basic (for http)
ParameterName string `json:"parameterName,omitempty"` // actual apiKey parameter/header/cookie name
Ref *ComponentLink `json:"ref,omitempty"` // link to model page
}
SecurityRequirement holds a resolved security scheme with type info and model link.
type SecurityRequirementGroup ¶
type SecurityRequirementGroup struct {
Requirements []*SecurityRequirement `json:"requirements,omitempty"`
}
SecurityRequirementGroup preserves OpenAPI's grouped security requirement semantics.
type ServerInfo ¶
type ServerInfo struct {
URL string
Description string
Variables []*ServerVariableInfo `json:"variables,omitempty"`
}
ServerInfo holds server endpoint data.
type ServerVariableInfo ¶
type ServerVariableInfo struct {
Name string `json:"name"`
Default string `json:"default,omitempty"`
Enum []string `json:"enum,omitempty"`
Description string `json:"description,omitempty"`
}
ServerVariableInfo holds a single server variable definition.
type Site ¶
type Site struct {
Root *RootPage
Operations []*OperationPage
Models map[string][]*ModelPage // keyed by component type slug (e.g. "schemas")
Webhooks []*OperationPage
Warnings []*BuildWarning
SpecFormat string // "yaml" or "json" — the input spec format
SchemaRegistry map[string]*SchemaRegistryEntry `json:"-"` // keyed by "componentType/name"
Lite bool // when true, use lite JS bundle (no mermaid/explorer)
OutputDir string `json:"-"` // default writer output directory from config
BaseURL string `json:"-"` // default HTML base URL from config
AssetMode string `json:"-"` // html hydration asset mode: portable or served
Source *SourceRef `json:"source,omitempty"`
HeaderContext *SiteHeaderContext `json:"headerContext,omitempty"`
}
Site is the fully rendered mutable output from the PrintingPress.
A Site returned by PressModel is the cached instance later reused by PrintHTML and PrintLLM, so caller mutations affect subsequent print output.
type SiteHeaderContext ¶ added in v0.0.55
type SiteHeaderContext struct {
CatalogHref string `json:"catalogHref,omitempty"`
OverviewHref string `json:"overviewHref,omitempty"`
ServiceName string `json:"serviceName,omitempty"`
CurrentVersion string `json:"currentVersion,omitempty"`
VersionsHref string `json:"versionsHref,omitempty"`
Versions []*SiteVersionLink `json:"versions,omitempty"`
}
SiteHeaderContext configures optional aggregate header controls for a rendered site.
type SiteVersionLink ¶ added in v0.0.55
type SiteVersionLink struct {
Label string `json:"label"`
Href string `json:"href"`
Active bool `json:"active,omitempty"`
}
SiteVersionLink describes one available version in the header switcher.