model

package
v0.0.76 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildWarning

type BuildWarning struct {
	Message string
	Context string // e.g. path, component name
	Err     error
}

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"`
	Counts          *ViolationCounts  `json:"counts,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"`
	ContentPages []*ContentPage    `json:"contentPages,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"`
	Contact       *ContactInfo       `json:"contact,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"`
	Counts        *ViolationCounts   `json:"counts,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"`
	Counts       *ViolationCounts    `json:"counts,omitempty"`
}

CatalogVersion groups one or more spec entries under the same service version.

type CodeSample added in v0.0.69

type CodeSample struct {
	Lang            string `json:"lang,omitempty"`
	Label           string `json:"label,omitempty"`
	Source          string `json:"source"`
	SourceRef       string `json:"sourceRef,omitempty"`
	HighlightedHTML string `json:"-"`
}

CodeSample holds a first-class operation code sample from x-codeSamples.

func (*CodeSample) DisplayLabel added in v0.0.69

func (c *CodeSample) DisplayLabel(index int) string

DisplayLabel returns the primary user-facing sample name, preferring lang over label.

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

type ContactInfo struct {
	Name  string `json:"name,omitempty"`
	URL   string `json:"url,omitempty"`
	Email string `json:"email,omitempty"`
}

ContactInfo holds API contact metadata.

type ContentPage added in v0.0.73

type ContentPage struct {
	Title       string              `json:"title"`
	Label       string              `json:"label,omitempty"`
	Slug        string              `json:"slug"`
	Href        string              `json:"href"`
	Description string              `json:"description,omitempty"`
	SourcePath  string              `json:"-"`
	SourceDir   string              `json:"-"`
	SourceAlias []string            `json:"-"`
	Body        string              `json:"-"`
	BodyHTML    string              `json:"bodyHtml,omitempty"`
	Order       int                 `json:"order,omitempty"`
	Hidden      bool                `json:"hidden,omitempty"`
	Assets      []*ContentPageAsset `json:"-"`
}

ContentPage is a convention-discovered Markdown page rendered alongside the generated API reference.

type ContentPageAsset added in v0.0.73

type ContentPageAsset struct {
	Href       string `json:"href"`
	SourcePath string `json:"-"`
	Data       []byte `json:"-"`
}

ContentPageAsset is a local or remote image copied into the generated docs.

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 DiagnosticsPage added in v0.0.61

type DiagnosticsPage struct {
	Title       string          `json:"title"`
	Slug        string          `json:"slug"`
	SiteCounts  ViolationCounts `json:"siteCounts"`
	Problems    []*PageProblem  `json:"problems"`
	OrphanCount int             `json:"orphanCount"`
}

DiagnosticsPage is the top-level developer-mode problem index.

type ExtensionEntry

type ExtensionEntry struct {
	Key   string `json:"key"`
	Value any    `json:"value"`
}

ExtensionEntry holds a single x-* extension key-value pair, preserving spec order.

type ExternalDocInfo

type ExternalDocInfo struct {
	URL         string
	Description string
}

ExternalDocInfo holds external documentation reference.

type FooterConfig added in v0.0.61

type FooterConfig struct {
	Disabled  bool   `json:"disabled,omitempty"`
	URL       string `json:"url,omitempty"`
	LinkTitle string `json:"linkTitle,omitempty"`
	Build     string `json:"build,omitempty"`
}

FooterConfig controls the optional pb33f footer rendered at the bottom of each generated HTML content page.

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 LLMOutputConfig added in v0.0.66

type LLMOutputConfig struct {
	AggregateSpecSizeThresholdBytes int64
	MaxAggregateFileBytes           int64
	GenerateMonoliths               string
}

LLMOutputConfig controls LLM-oriented aggregate text artifacts for a site.

type LicenseInfo

type LicenseInfo struct {
	Name string
	URL  string
}

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:"-"`
	Counts                   ViolationCounts
	Problems                 []*PageProblem
	Slices                   map[string]*YamlSlice
}

ModelPage is the full data for rendering a component detail page.

type NavModel struct {
	Name        string           `json:"name"`
	Slug        string           `json:"slug"`
	TypeSlug    string           `json:"typeSlug"`
	Description string           `json:"description,omitempty"`
	Counts      *ViolationCounts `json:"counts,omitempty"`
}

NavModel is a lightweight reference to a model for navigation.

type NavModelGroup struct {
	Name         string           `json:"name"`
	TypeSlug     string           `json:"typeSlug"`
	Models       []*NavModel      `json:"models"`
	CardMinWidth int              `json:"cardMinWidth,omitempty"`
	Counts       *ViolationCounts `json:"counts,omitempty"`
}

NavModelGroup is a group of models of the same component type for navigation.

func (g *NavModelGroup) CardGridStyle() string
type NavOperation struct {
	Method      string           `json:"method"`
	Path        string           `json:"path"`
	OperationID string           `json:"operationId"`
	Summary     string           `json:"summary"`
	Slug        string           `json:"slug"`
	Deprecated  bool             `json:"deprecated"`
	Counts      *ViolationCounts `json:"counts,omitempty"`
}

NavOperation is a lightweight reference to an operation for navigation.

type NavTag struct {
	Name        string           `json:"name"`
	Summary     string           `json:"summary"`
	Slug        string           `json:"slug"`
	Description string           `json:"description,omitempty"`
	DescHTML    string           `json:"-"`
	Children    []*NavTag        `json:"children"`
	Operations  []*NavOperation  `json:"operations"`
	IsNavOnly   bool             `json:"isNavOnly"` // kind: nav (grouping node with no direct operations)
	Counts      *ViolationCounts `json:"counts,omitempty"`
}

NavTag represents a tag node in the hierarchical navigation tree.

func (t *NavTag) DisplayName() string

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"`
	CodeSamples           []*CodeSample     `json:"codeSamples,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
	Counts                ViolationCounts
	Problems              []*PageProblem
	Slices                map[string]*YamlSlice
}

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 PageProblem added in v0.0.61

type PageProblem struct {
	Category        string `json:"category"`
	JSONPath        string `json:"jsonPath"`
	EndColumn       int    `json:"endColumn"`
	EndLineNumber   int    `json:"endLineNumber"`
	Message         string `json:"message"`
	Severity        int    `json:"severity"`
	StartColumn     int    `json:"startColumn"`
	StartLineNumber int    `json:"startLineNumber"`
	Source          string `json:"source"`
	ID              string `json:"id"`
	SourceLocation  string `json:"sourceLocation"`
	PageHref        string `json:"pageHref,omitempty"`
	PageTitle       string `json:"pageTitle,omitempty"`
	PageKind        string `json:"pageKind,omitempty"`
	PageMethod      string `json:"pageMethod,omitempty"`
	PagePath        string `json:"pagePath,omitempty"`
	PageOperationID string `json:"pageOperationId,omitempty"`
	PageComponent   string `json:"pageComponent,omitempty"`
	SliceKey        string `json:"sliceKey,omitempty"`
}

PageProblem matches cowboy-components' Problem wire shape. PageHref, PageTitle, and SliceKey are printing-press metadata copied into hydration side-channel maps because Problem.reconstruct preserves only known fields.

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"`
	Counts             ViolationCounts
	Problems           []*PageProblem
	Slices             map[string]*YamlSlice
}

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
	ContentPages       []*ContentPage
	Models             map[string][]*ModelPage // keyed by component type slug (e.g. "schemas")
	Webhooks           []*OperationPage
	Diagnostics        *DiagnosticsPage
	OrphanResults      []*v3.RuleFunctionResult `json:"-"`
	Embedded           bool                     `json:"embedded,omitempty"`
	DeveloperMode      bool                     `json:"developerMode,omitempty"`
	HostedDocumentID   string                   `json:"hostedDocumentId,omitempty"`
	DocsExpiresAt      string                   `json:"docsExpiresAt,omitempty"`
	ArchiveExportURL   string                   `json:"-"`
	NavTags            []*NavTag
	NavModelGroups     []*NavModelGroup
	NavWebhooks        []*NavOperation `json:"-"` // webhook nav entries
	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)
	NoMermaid          bool                            // when true, suppress inline mermaid rendering
	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
	SharedAssetBaseURL string                          `json:"-"` // when set, shared assets are referenced at this URL prefix and not copied into the artifact
	SourceSizeBytes    int64                           `json:"-"` // root source size used for large-spec LLM aggregate policy
	LLM                LLMOutputConfig                 `json:"-"` // resolved LLM writer policy
	Footer             *FooterConfig                   `json:"footer,omitempty"`
	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 struct {
	Label  string `json:"label"`
	Href   string `json:"href"`
	Active bool   `json:"active,omitempty"`
}

SiteVersionLink describes one available version in the header switcher.

type SourceRef

type SourceRef struct {
	Path string `json:"path,omitempty"`
	Line int    `json:"line,omitempty"`
	Href string `json:"href,omitempty"`
}

SourceRef points back to the originating specification file for a rendered page or object.

type ViolationCounts added in v0.0.61

type ViolationCounts struct {
	Errors int `json:"errors"`
	Warns  int `json:"warns"`
	Infos  int `json:"infos"`
}

ViolationCounts groups lint results by the severities rendered by developer mode.

func (ViolationCounts) Total added in v0.0.61

func (c ViolationCounts) Total() int

Total returns the sum of all visible violation severities.

type YamlSlice added in v0.0.61

type YamlSlice struct {
	Key          string `json:"key"`
	File         string `json:"file"`
	FirstLine    int    `json:"firstLine"`
	Source       string `json:"source,omitempty"`
	LastLine     int    `json:"-"`
	ResolvedFile string `json:"-"`
}

YamlSlice contains a bounded source excerpt for a problem drawer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL